Currently, if the cluster is configured to turn off autosplitting, mongos still tracks the estimated size of each chunk that gets written to through it. This is fine, except that at this line, we refresh the balancer configuration from the config server, and if we don't set the chunk size back to zero, we'll continue to reach this line (because shouldSplit will return true) for every single insert. In other words, once a chunk reaches splitting size and the autosplitter is off, we'll query the config server for every single insert until that chunk is split manually or through some other means. This is unnecessary and hurts performance. We should at least reset the chunk size to zero so we won't try to split it again until many more inserts have been received.
- is related to
-
SERVER-5375 poor mongos insert/update performance when many duplicate shard keys are present due to Chunk::splitIfShould() (OS X specific?)
- Closed