Ask HN: What is the best MongoDB AWS configuration for maximum performance?
We are struggling with performance issues in MongoDB on AWS using Node.js and the Mongoose module. Has anyone struggled with similar issues and know how to improve this?
We constantly perform inserts to a collection with 13 indices and 16 basic types fields. On a Dell notebook (XPS 9343 i7 2015 8gb with SSD) running Microsoft Windows it is 10x faster than in AWS running Linux. I don't think the OS is the main issue.
We have tried to improve the performance of the AWS instance using SSDs (io1 volume type) and a m4.2xlarge (8 vcpu and 32 GiB of memory) but we are not seeing significant improvements when scaling the VM or changing the storage type.
(
9 comments
| 4 points
| on HN
)
Does your Dell machine has exactly the same data files as the aws instance ? As the size grows index grows as well. Also you have not mentioned how many mongo instances in the cluster. One easy way is, you could separate the index and data directories into separate volumes, think this is only possible in wired tiger though.
We had 27 instances (9 shards) 3 routers and 3 configs
Main instances ran on c*.4xl machines with 5,000-10,000iops disks. SSD wasn't nearly enough for us.
How large is the dataset too?
Honestly, I know people like to complain about Mongo a lot of times, but frankly I have had really large and small datasets use it and when setup properly with a well designed schema it never was the bottle neck in terms of performance etc. But on a couple of occasions we chose to move away from Mongo because the trade off in schema and machine config to make it work was more of a problem for us.