GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation
  • Privacy Statement
  • License Agreement
  • Contact Us

This view

  • Original page
  • New address

GeezerVison is showing docs.voltactivedata.com — Chapter 3. Starting and Stopping the Database

  • Volt Active Data
  • Developer Hub
  • Books
    • VoltDB Tutorial
    • Using VoltDB
    • VoltDB Guide to Performance and Customization
    • VoltDB Administrator's Guide
    • Volt Kubernetes Administrator's Guide
    • VoltDB Quick Reference
  • VoltDB V16
    • VoltDB V16
    • VoltDB V15.3 LTS
    • VoltDB V14.3 LTS
    • VoltDB V13.3 LTS
    • VoltDB V12.3 LTS
    • VoltDB V11.4
    • VoltDB V10.2
    • VoltDB V9.3
Chapter 3. Starting and Stopping the Database

Administrator's Guide

  • Preface▶
    • 1. Structure of This Book
    • 2. Related Documents
  • 1. Managing Volt Active Data Databases▶
    • 1.1. Getting Started
    • 1.2. Understanding the VoltDB Utilities
    • 1.3. Management Tasks
  • 2. Preparing the Servers▶
    • 2.1. Server Checklist
    • 2.2. Install Required Software
    • 2.3. Configure Memory Management
      • 2.3.1. Disable Swapping
      • 2.3.2. Disable Transparent Huge Pages
      • 2.3.3. Enable Virtual Memory Mapping and Overcommit
    • 2.4. Turn off TCP Segmentation
    • 2.5. Configure Time Services
    • 2.6. Increase Resource Limits
    • 2.7. Configure the Network
    • 2.8. Assign Network Ports
    • 2.9. Eliminating Server Process Latency
  • 3. Starting and Stopping the Database▶
    • 3.1. Configuring the Cluster and Database
    • 3.2. Initializing the Database Root Directory
    • 3.3. Starting the Database
    • 3.4. Loading the Database Definition
      • 3.4.1. Preloading the Schema and Classes When You Initialize the Database
      • 3.4.2. Loading the Schema and Classes After the Database Starts
    • 3.5. Stopping the Database
    • 3.6. Restarting the Database
    • 3.7. Starting and Stopping Individual Servers
  • 4. Maintenance and Upgrades▶
    • 4.1. Backing Up the Database
    • 4.2. Updating the Database Schema
      • 4.2.1. Performing Live Schema Updates
      • 4.2.2. Performing Updates Using Save and Restore
    • 4.3. Upgrading the Cluster
      • 4.3.1. Performing Server Upgrades
      • 4.3.2. Performing Rolling Hardware Upgrades on K-Safe Clusters
      • 4.3.3. Adding Servers to a Running Cluster with Elastic Scaling
      • 4.3.4. Removing Servers from a Running Cluster with Elastic Scaling
      • 4.3.5. Reconfiguring the Cluster During a Maintenance Window
    • 4.4. Upgrading Existing VoltDB Installations
      • 4.4.1. Upgrading the VoltDB Software
      • 4.4.2. Upgrading VoltDB Using Save and Restore
      • 4.4.3. Upgrading Older Versions of VoltDB Manually
      • 4.4.4. Performing an In-Service Upgrade of a Single Cluster
      • 4.4.5. Performing an Online Upgrade Using Multiple XDCR Clusters
      • 4.4.6. Downgrading, or Falling Back to a Previous VoltDB Version
    • 4.5. Updating the VoltDB Software License
  • 5. Monitoring VoltDB Databases▶
    • 5.1. Monitoring Overall Database Activity
      • 5.1.1. Volt Management Center
      • 5.1.2. System Procedures
      • 5.1.3. SNMP Alerts
    • 5.2. Setting the Database to Read-Only Mode When System Resources Run Low
      • 5.2.1. Monitoring Memory Usage
      • 5.2.2. Monitoring Disk Usage
    • 5.3. Integrating VoltDB with Prometheus
    • 5.4. Integrating VoltDB with Datadog
  • 6. Logging and Analyzing Activity in a VoltDB Database▶
    • 6.1. Introduction to Logging
    • 6.2. Creating the Logging Configuration File
    • 6.3. Changing the Timezone of Log Messages
    • 6.4. Managing VoltDB Log Files
    • 6.5. Enabling Your Custom Log Configuration When Starting VoltDB
    • 6.6. Changing the Configuration on the Fly
  • 7. What to Do When Problems Arise▶
    • 7.1. Where to Look for Answers
    • 7.2. Handling Errors When Restoring a Database
      • 7.2.1. Logging Constraint Violations
      • 7.2.2. Safe Mode Recovery
    • 7.3. Collecting the Log Files
  • A. Server Configuration Options▶
    • A.1. Server Configuration Options
      • A.1.1. Network Configuration (DNS)
      • A.1.2. Time Configuration
    • A.2. Process Configuration Options
      • A.2.1. Maximum Heap Size (VOLTDB_HEAPMAX)
      • A.2.2. Garbage Collector (VOLTDB_GC_OPTS)
      • A.2.3. Other Java Runtime Options (VOLTDB_OPTS)
    • A.3. Database Configuration Options
      • A.3.1. Sites per Host
      • A.3.2. K-Safety
      • A.3.3. Snapshot Management
      • A.3.4. Import and Export
      • A.3.5. Command Logging
      • A.3.6. Heartbeat
      • A.3.7. Temp Table Size
      • A.3.8. Query Timeout
      • A.3.9. Flush Interval
      • A.3.10. Long-Running Process Warning
      • A.3.11. Copying Array Parameters
      • A.3.12. Clock Skew
    • A.4. Path Configuration Options
      • A.4.1. VoltDB Root
      • A.4.2. Snapshots Path
      • A.4.3. Export Overflow Path
      • A.4.4. Command Log Path
      • A.4.5. Command Log Snapshots Path
    • A.5. Network Ports
      • A.5.1. Client Port
      • A.5.2. Admin Port
      • A.5.3. Internal Server Port
      • A.5.4. Metrics Port
      • A.5.5. Replication Port
      • A.5.6. Zookeeper Port
      • A.5.7. TLS/SSL Encryption (Including HTTPS)
  • B. Volt Active Data Metrics▶
    • B.1. Database Tables and Indexes
    • B.2. Transactions, Procedures, and the Planner
    • B.3. Memory and CPU Usage
    • B.4. Client Connections and I/O
    • B.5. High Availability and Durability
    • B.6. Streaming Data
    • B.7. User-Defined Tasks
    • B.8. System and Cluster Status
  • C. Snapshot Utilities▶
    • snapshotconvert
    • snapshottransfer
    • snapshotverifier

Chapter 3. Starting and Stopping the Database

The fundamental operations for database administration are starting and stopping the database. But before you start the database, you need to decide what database features you want to enable and how they should work. These features include attributes such as the amount of replication you want to use to increase availability in case of server failure and what level of durability is required for those cases where the database itself stops. These and other settings are defined in the configuration files, which you specify on the command line when you initialize the root directory for the database on each server.

This chapter explains how to configure the cluster's physical structure and features in the configuration file and how to initialize the root directory and start and stop the database.

3.1. Configuring the Cluster and Database

You specify the cluster configuration and what features to use in in one or more configuration files. Configuration files are YAML files that you can create and edit manually, where each property is entered on a separate line followed by a colon and the hierarchy of properties is represented by indentation of subproperties. For example, a simple configuration file specifying how many partitions to create on each server and what level of availability (K-safety) to use looks like this:

deployment:
  cluster:
    sitesperhost: 12
    kfactor: 1
  • The sitesperhost property specifies the number of partitions (or "sites") to create on each server. Set to eight by default, it is possible to optimize the number of sites per host in relation to the number of processors per machine. The optimal number is best determined by performance testing against the expected workload. See the chapter on "Benchmarking" in the VoltDB Planning Guide for details.

  • The kfactor property specifies the K-safety value to use. The higher the K-safety value, the more node failures the cluster can withstand without affecting database availability. However, increasing the K-safety value increases the number of copies of each unique partition. High availability is a tradeoff between replication to protect against node failure and the number of unique partitions, therefore throughput performance. See the chapter on availability in the Using VoltDB manual for more information on determining an optimal K-safety value.

You will sometimes see YAML properties represented in dot notation. Dot notation presents the YAML hierarchy with the successive property names separated by periods. For example, kfactor can be more fully described in dot notation as deployment.cluster.kfactor. Dot notation is used in the voltadmin get and set commands for operating on individual property values. You will also see it occasionally in the text of the documentation as a convenient shorthand for deeply nested subproperties.

In addition to the sites per host and K-safety, you can use the configuration file to enable and configure specific database features such as export, command logging, and so on. The following table summarizes some of the key features that are settable in the configuration.

Table 3.1. Selecting Database Features in the Configuration File

FeatureExample
Command Logging — Command logging provides durability by logging transactions to disk so they can be replayed during a recovery. You can configure the type of command logging (synchronous or asynchronous), the log file size, and the frequency of the logs (in terms of milliseconds or number of transactions).
deployment:
  commandlog:
    enabled: true
    synchronous: false
    frequency:
      time: 300
      transactions: 1000
Snapshots — Automatic snapshot provide another form of durability by creating snapshots of the database contents, that can be restored later. You can configure the frequency of the snapshots, the unique file prefix, and how many snapshots are kept at any given time.
deployment:
  snapshot:
    enabled: true
    frequency: 30m
    prefix: mydb
    retain: 3
Export — Export allows you to write selected records from the database to one or more external targets, which can be files, another database, or another service. VoltDB provides different export connectors for each protocol. You can configure the type of export for each stream as well as other properties, which are specific to the connector type. For example, the file connector requires a specific type (or format) for the files and a unique identifier called a "nonce".
deployment:
  export:
    configurations:
    - target: dblog
      type: file
      properties:
      - name type
        value: csv
      - name: nonce
        value: dblog
Security & Accounts — Security lets you protect your database against unwanted access by requiring all connections authenticate against known usernames and passwords. In the deployment file you can define the user accounts and passwords and what role or roles each user fulfills. Roles define what permissions the account has. Roles are defined in the database schema.
deployment:
  security:
    enabled: true
  users:
  - name: admin 
    password: superman 
    roles: administrator
  - name: mitty
    password: thurber
    roles: user                        
File Paths — Paths define where VoltDB writes any files or other disc-based content. You can configure specific paths for each type of service, such as snapshots, command logs, export overflow, etc.
deployment:
  paths:
    exportoverflow:
      path: /tmp/overflow
    snapshots:
      path: opt/archive

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.