My application is running mongodb 2.4.8 using 2.11.2 version of java driver. It always end up with mongo taking too much cache on my RHEL when there are too many objects in the database. Almost 4GB of my total 8GB is mostly cached. Even if i try to clear the cache forcefully (as admin) using "sync; echo 3 > /proc/sys/vm/drop_caches" it does not clear the cache, but once i stop mongo i can clear the cache using this command. I see nearly 600+ connections to my mongo server using db.serverStatus().connections (I have nearly 6 other app servers writing or reading data from the mongo server).
- Is this connection number that is causing the heavy cache?
- Even if not, should i be having these many connections to my database?
- Currently connectionsPerHost is set as 100 in my code. Is this too high?
- Can i keep the connectionsPerHost to 10 and threadsAllowedToBlockForConnectionMultiplier to something like 500? Is this something that is recommended?
Thanks in advance