Mongodb – Split Vector is taking too much time in mongo shard

mongodbsharding

I am using mongo shard distribution system. This system performs slow as the data size increases. I checked with profiler and saw split vector is taking to much time while running.

It happened after a day when one of my shard replica set went down and i had to remove that from cluster. Now i am running a single shard replica cluster. I have disabled the balancer as currently there is no second shard. Could you please help me to under stand why this process is slow.

Best Answer

The splitVector commands are slow because your system is slow, it's not the cause of the slowness itself - it just happens to be running frequently and hence is showing up a lot in your logs - it is a symptom not a cause (unless you are running many, many mongos processes and hitting an edge case). People often make the same mistake by misdiagnosing slow serverStatus commands (run every 60 seconds by MMS monitoring) as a root cause.

Usually the slowness is because your system is oversubscribed and hitting a bottleneck somewhere, but you have not provided enough information to make a guess as to what your issue is. I would recommend looking for other evidence in the logs as well as the usual suspects (IO, CPU, Memory) to narrow down the actual root cause here.