Forum: Building VoltDB Applications

Post: Size of partition in terms of memory or number of rows

Size of partition in terms of memory or number of rows
Nov 30, 2016
Does the partition have an upper limit of memory or number of rows that it can store? I means, what is the size of each partition? and what are the parameters which decide it?
Nov 30, 2016
The partition itself doesn't have a limit on the number of rows it can store or the amount of RAM it can use. Rather than creating specific partitions for specific sub-sets of data as you might do in other systems, VoltDB partitions are meant to be managed automatically. The number of partitions in the cluster is based on the "sitesperhost" and "kfactor" values that you set in the configuration, and the number of hosts (servers or nodes) in your cluster. If you need to add servers to the cluster at some point to scale out, it will automatically increase the number of partitions and rebalance the data. Rows are assigned to a partition based on a consistent hashing algorithm, rather than with something like ranges that you would have to continually manage. By evenly distributing the data across the partitions by choosing an appropriate partitioning key, you can get higher throughput and the storage should be even across the servers.

You can however optionally set specific rows-per-partition limits by using the LIMIT PARTITION ROWS syntax in the CREATE TABLE statement: