Below are instructions for configuring data striping.
Configuring basic striping settings
The number of stripes can be configured for each instance of MemDB.
How does the stripe count work?
To scale well on increasingly multi-core systems, it’s important to understand how the stripe count works:
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.
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.
|We recommend that you consult with OpenCloud 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.
|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>
The striping configuration for a replicated MemDB instance looks like this:
<memdb> ... <stripe-count>8</stripe-count> </memdb>
Advanced configuration: using a stripe offset
It is possible (though very uncommon), to configure a stripe offset for replicated MemDB instances.
What is a "stripe offset"?
Each replicated MemDB declares which Savanna group it runs on. For example:
<memdb> ... <group-name>rhino-db</group-name> ... </memdb>
When using data striping, each stripe runs on a separate Savanna group. By default, these groups are zero-indexed, taking names (in this example) such as
A stripe offset raises the index of the first stripe. So, for example, a stripe offset of
Below are details on when to consider using and how to set a stripe offset.
When should I use a stripe offset?
Very likely, never. The combination of Savanna group name and stripe offset allow an administrator greater flexibility in mapping data stripes to groups.
Typically, when choosing which Savanna groups to use for MemDB, use of the
group-name should be sufficient.
To run multiple MemDB instances on the same Savanna group, configure them with the same
To run multiple MemDB instances on different Savanna groups, configure them with different
How do I set the stripe offset?
The default stripe offset is 0.
To change the offset for a particular MemDB instance, edit the MemDB configuration for that instance in the
config/rhino-config.xml file, in each Rhino node directory, adding a
|The stripe offset 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 offset which is inconsistent with other nodes in the cluster. Therefore, the stripe offset cannot be changed while a cluster is running.|
The stripe offset configuration for a replicated MemDB instance looks like this:
<memdb> ... <stripe-count>8</stripe-count> <stripe-offset>4</stripe-offset> </memdb>