High CPU usage on mongodb server when idle?
I'm getting strange usage numbers on MongoDB server when it is in almost idle state: http://pastebin.com/cKVyGMts (no queries) DB size is about 3.3 Gb.
I can see in mongodb.log
that snapshotthread is eating too much CPU:
Wed Nov 28 19:02:14 [snapshotthread] cpu: elapsed:4000 writelock: 0% Wed Nov 28 19:02:18 [snapshotthread] cpu: elapsed:4000 writelock: 0% Wed Nov 28 19:02:22 [snapshotthread] cpu: elapsed:4000 writelock: 0% Wed Nov 28 19:02:26 [snapshotthread] cpu: elapsed:4000 writelock: 0%
And data from top confirms it: http://pastebin.com/d57ybpBJ (iotop shows that there are no high disk activity present).
I'm running high-cpu instance on EC2, mongo confing and startup information is here: http://pastebin.com/YZyyq0gc.
How I can disable snapshotting or what can cause such a high CPU usage?
Solution 1:
According to JIRA some changes where made to memory allocation algorithm in version 2.2.0, which possibly could fix this issue.
MongoDB high CPU usage, low disk IO, very slow response