Priority: Blocker - P1
Resolution: Works as Designed
Affects Version/s: None
Fix Version/s: None
Environment:4-CPU 16GB RAM CenOS 6.2 VM
I've a single Mongo instance running on a 4-CPU 16GB RAM CenOS 6.2 VM. It's running very slowly mostly of the time. Here is the mongostat output:
The command line options are: --rest --fork --master --oplogSize=22770 --port 27017 --dbpath /data/mongodb/dbdata/ --logpath /data/logs/mongodb.log --auth
Here is the top output:
The weird thing is MongoDB consistently only consumes only 2.6G of RAM! However, the output from 'top' shows all 16GB RAM is used up.
A couple of other observations:
- The CPU load from 'top' is usually between 2.00 to 3.00
- The lock% range between 40 to 80.
- When the read queue goes up to 150 to 200, the system is unusable.
- The number of faults is not too bad, but iostat shows 100% IO itilization on the mongo partition. Also, sometimes the await time in iostat is more than 1000ms!!!
The DB has one large collection having about 50 million documents; all other collections are small. The DB serves about 2000 users frontended by Tomcat (which has almost no load).
I cannot figure out why it uses less than 3GB of RAM while the system has 16GB.
Are we doing something obviously wrong here?