I'm testing mongodb starting with one node, then 2 datanodes (1 master, 1 config-server and 2 masters), then 4 datanodes (1 master, 1 config-server, 4 masters) and with 16 datanodes (same configuration as before with 16 masters). I noticed the throughput is the same indipendently from the number of nodes: with 30 threads (using YCSB) I obtained about 6000 ops/sec with 2, 4 or 16 nodes!! It's normal? Or there are some parameters to set??
Thanks for your replies!
You may have a non balanced shard configuration based on the value of the keys. This shard key isn't likely optimal with YCSB:
shard key: { "_id" : 1 }
You may instead want to try hash sharding like:
shard key: { "_id" : "hashed" }
One way you can tell is to run mongostat on each shard and see if you are getting a nice spread of OPS. If not, then iterate on shard keys until you do. YCSB may need to be altered with this in mind.