5.2. Determining Sites Per Host

Documentation

Home » Documentation » Planning Guide

5.2. Determining Sites Per Host

Another important goal for benchmarking is determining the optimal number of sites per host. Each VoltDB server can host multiple partitions, or "sites". The ideal number of sites per host is related to the number of processor cores available on the server. However, it is not an exact one-to-one relationship. Usually, the number of sites is slightly lower than the number of cores.

The equation becomes even more complex with hyperthreading, which "virtualizes" multiple processors for each physical core. Hyperthreading can improve the number of sites per host that a VoltDB server can support. But again, not in direct proportion to a non-hyperthreaded server.

Important

In general, VoltDB performs best with between 4 and 16 sites per host. However, you should never exceed 24 sites per host, even if the number of processor cores might support more, because the processing required to manage so many sites begins to conflict with the data processing.

The easiest way to determine the optimal number of sites per host is by testing, or benchmarking, against the target application. The process for determining the correct number of sites for a specific hardware configuration is as follows:

  1. Create a benchmark application that measures the optimal throughput, as described in Section 5.1, “Benchmarking for Performance”.

  2. Run the benchmark application multiple times, each time increasing the number of sites per host for the database.

  3. Make note of the optimal throughput for each run and graph the optimal TPS against the number of sites per host.

As the number of sites per host increases, the optimal throughput increases as well. However, at some point, the number of sites exceeds the number of threads that the hardware can support, at which point the throughput levels out, or even decreases, as contention occurs in the processor. Figure 5.2, “Determining Optimal Sites Per Host” shows the results graph of a hypothetical benchmark of sites per host for a quad core server. In this case, the optimal number of sites per host turned out to be three.

Figure 5.2. Determining Optimal Sites Per Host

Determining Optimal Sites Per Host

By graphing the relationship between throughput and partitions using a benchmark application, it is possible to maximize database performance for the specific hardware configuration you will be using.