Test performance of chunk migrations under load
Test
Move one chunk, containing 25k documents, from one shard to another.
While one chunk migrating, benchRun is used to apply a mixed load onto the documents in the non-migrating chunks.
Throughput of the background load is also reported in metrics starting with "bg_". The goal of this test is basically for the migration speed to be as high as possible, while impacting the background load as little as possible.
Unless user specifies otherwise, uses default value for _secondaryThrottle (false for WiredTiger and true for MMAPv1), and _waitForDelete is set to true.
The test takes an optional 'thread_levels' parameters: an array specifying the number of threads to use for load.
Uses moveChunk command
Results are reported as docs moved / sec.
Setup
Requires a sharded cluster.
Test inserts 100k documents, split evenly into one more chunk than there are shards. One chunk each is permanently moved to each of the shards. The last chunk is the one the test moves around. (Note that the test maxes out at five moves to avoid a large number of moves if the cluster has many shards.)
Field a is indexed, containing uniformly random numbers.
Notes
The load that is here used only as background load was subsequently extracted into its own test in module:workloads/mix.
Owning-team
mongodb/sharding
- Source:
Members
(inner) secondary_throttle
The value for the _secondaryThrottle parameter to the moveChunk command.
- Source:
(inner) thread_levels
The number of threads to run in parallel. The default is [0, 4, 64, 128, 256]. Note: Thread count should be divisible by 4.
- Source:
(inner) wait_for_delete
The value for the _waitForDelete parameter to the moveChunk command.
- Source: