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.voltdb.com — 4.2. Distributing Data in a Cluster

  • 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
4.2. Distributing Data in a Cluster

Planning Guide

  • Preface▶
    • 1. Organization of this Manual
    • 2. Other Resources
  • 1. The Planning Process
  • 2. Proof of Concept▶
    • 2.1. Effective Partitioning
    • 2.2. Designing the Stored Procedures
  • 3. Choosing Hardware▶
    • 3.1. The Dimensions of Hardware Sizing
    • 3.2. Sizing for Throughput
    • 3.3. Sizing for Capacity
    • 3.4. Sizing for Durability
  • 4. Sizing Memory▶
    • 4.1. Planning for Database Capacity
      • 4.1.1. Sizing Database Tables
      • 4.1.2. Sizing Database Indexes
      • 4.1.3. An Example of Database Sizing
    • 4.2. Distributing Data in a Cluster
      • 4.2.1. Data Memory Usage in Clusters
      • 4.2.2. Memory Requirements for High Availability (K-Safety)
    • 4.3. Planning for the Server Process (Java Heap Size)
      • 4.3.1. Attributes that Affect Heap Size
      • 4.3.2. Guidelines for Determining Java Heap Size
  • 5. Benchmarking▶
    • 5.1. Benchmarking for Performance
      • 5.1.1. Designing Your Benchmark Application
      • 5.1.2. How to Measure Throughput
      • 5.1.3. How to Measure Latency
    • 5.2. Determining Sites Per Host

4.2. Distributing Data in a Cluster

In the simplest case, a single server, the sum of the sizing calculations in the previous section gives you an accurate estimate of the memory required for the database content. However, VoltDB scales best in a cluster environment. In that case, you need to determine how much of the data will be handled by each server, which is affected by the number of servers, the number and size of partitioned and replicated tables, and the level of availability, or K-safety, required.

The following sections explain how to determine the distribution (and therefore sizing) of partitioned and replicated tables in a cluster and the impact of K-safety.

4.2.1. Data Memory Usage in Clusters

Although it is tempting to simply divide the total memory required by the database content by the number of servers, this is not an accurate formula for two reasons:

  • Not all data is partitioned. Replicated tables (and their indexes) appear on all servers.

  • Few if any partitioning schemes provide perfectly even distribution. It is important to account for some variation in the distribution.

To accurately calculate the memory usage per server in a cluster, you must account for all replicated tables and indexes plus each server's portion of the partitioned tables and indexes.

Data per server = replicated tables + (partitioned tables/number of servers)

Using the sample sizing for the Flight database described in Section 4.1.3, “An Example of Database Sizing”, the total memory required for the replicated tables and indexes (for the Flight and Airport tables) is only approximately 12 megabytes. The memory required for the remaining partitioned tables and indexes is approximately 490 megabytes. Assuming the database is run on two servers, the total memory required for data on each server is approximately 256 megabytes:

          12   Replicated data
    2          Number of servers
  490    245   Paritioned data total / per server
         256   Total

Of course, no partitioning scheme is perfect. So it is a good idea to provide additional space (say 20% to 30%) to allow for any imbalance in the partitioning.

4.2.2. Memory Requirements for High Availability (K-Safety)

The features you plan to use with a VoltDB database also impact capacity planning, most notably K-Safety. K-Safety improves availability by replicating data across the cluster, allowing the database to survive individual node failures.

Because K-Safety involves replication, it also increases the memory requirements for storing the replicated data. Perhaps the easiest way to size a K-Safe cluster is to size a non-replicated cluster, then multiply by the K-Safety value plus one.

For example, let's assume you plan to run a database with a K-Safety value of 2 (in other words, three copies) on a 6-node cluster. The easiest way to determine the required memory capacity per server is to calculate the memory requirements for a 2-node (non K-Safe) cluster, then create three copies of that hardware and memory configuration.

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.