Configuring basic striping settings

The number of stripes can be configured for each instance of MemDB.

Note
How does the stripe count work?

To scale well on increasingly multi-core systems, it’s important to understand how the stripe count works:

  • Each MemDB stripe has a single commit order. While concurrent transactions (different events processed in parallel) execute concurrently against a single MemDB stripe, the commit protocol enforces an ordering, which means that no more than one commit at a time can occur against a single stripe.

  • While a single CPU can process thousands of commits per second, eventually a single commit order becomes a latency and scalability bottleneck.

  • Therefore, configuring a stripe count greater than 1 means that there is now more than 1 commit order — which means there is more scalability. So a stripe count of 8 means that up to 8 transactions can commit concurrently.

In summary, stripe count is the measure of commit concurrency.

Below are details on the default settings for stripe counts, and how to choose and set the stripe count for your MemDB instances.

Default settings

By default, Rhino disables data striping for all MemDB instances.

Choosing a stripe count

The stripe count must be 1 or greater, and must be a power of two (1, 2, 4, 8, 16, …​). The stripe count should be proportional to the number of CPU cores in a server. A good rule of thumb is that the stripe count should be about 1/2 the number of CPU cores.

To disable striping, use a stripe count of 1.

In some cases when nodes are regularly leaving and joining a cluster, there is a chance of all cluster nodes being restarted as a result of striping being enabled.

Warning We recommend that you consult with Metaswitch before enabling striping to ensure it is configured correctly in a stable and consistent network.

Setting the stripe count

Each MemDB instance has its own stripe count. To configure the stripe count for a particular MemDB instance, you edit the MemDB configuration for that instance, in the config/rhino-config.xml file in each Rhino node directory.

Warning The stripe count for a MemDB instance must be the same on all nodes in the cluster. A new node will not start if it contains a stripe count which is inconsistent with other nodes in the cluster. Therefore, the stripe count cannot be changed while a cluster is running.

The striping configuration for a local MemDB instance looks like this:

<memdb-local>
  ...
  <stripe-count>8</stripe-count>
</memdb-local>
Warning Data striping is not a supported configuration for replicated MemDB instance.
Previous page Next page
Rhino Version 3.0.0