I have set a MongoDB Sharded Cluster with 2 shards (3 replicas set), 3 configSrv and 2 mongos, and my problem is when I make an insert query > it writes at only 1000 w/per second for a simple query indexed id + firstname.
That seems to be abnormally slow when looking at my server setup which is as follows :
(In comparison when I have tested on a standalone MongoDB server, I could easily reach 25000 w/per second...)
Anyone can tell me why I cannot get more than 1000 w/per second ?
With Htop the cpu is only used between 2% and 7%, the ram is at 0.4%.
Problem is mongos, shard or configSrv ?
Thank you for advice.
If you set writeConcern: 0 and journaling: 0 it will be much faster...