I am running in OpenVZ container with Ubuntu 14.04 LTS.

MongoDB version:

db version v3.0.4
git version: 0481c958daeb2969800511e7475dc66986fa9ed5

I use clean installation like described here - http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

top shows around 100% - 150% CPU

30480 mongodb   20   0  548096  66920  39884 S 150.2  1.6   4:55.38 mongod

This is while nothing else is going on. Nothing else is running in the container. No queries, no connections.

I have tried lock file in this question: https://stackoverflow.com/questions/10747580/mongodb-service-at-100-cpu. It's not it.

Edit (Log file upon start)

2015-07-09T14:05:48.998+0200 I JOURNAL  [initandlisten] journal dir=/var/lib/mongodb/journal
2015-07-09T14:05:48.998+0200 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
2015-07-09T14:05:49.061+0200 I JOURNAL  [durability] Durability thread started
2015-07-09T14:05:49.061+0200 I JOURNAL  [journal writer] Journal writer thread started
2015-07-09T14:05:49.062+0200 I CONTROL  [initandlisten] MongoDB starting : pid=30480 port=27017 dbpath=/var/lib/mongodb 64-bit host=euler-dev
2015-07-09T14:05:49.062+0200 I CONTROL  [initandlisten] 
2015-07-09T14:05:49.062+0200 I CONTROL  [initandlisten] ** WARNING: You are running in OpenVZ which can cause issues on versions of RHEL older than RHEL6.
2015-07-09T14:05:49.063+0200 I CONTROL  [initandlisten] 
2015-07-09T14:05:49.063+0200 I CONTROL  [initandlisten] db version v3.0.4
2015-07-09T14:05:49.063+0200 I CONTROL  [initandlisten] git version: 0481c958daeb2969800511e7475dc66986fa9ed5
2015-07-09T14:05:49.063+0200 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2015-07-09T14:05:49.063+0200 I CONTROL  [initandlisten] build info: Linux ip-10-45-73-23 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-07-09T14:05:49.063+0200 I CONTROL  [initandlisten] allocator: tcmalloc
2015-07-09T14:05:49.063+0200 I CONTROL  [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "", port: 27017 }, storage: { dbPath: "/var/lib/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2015-07-09T14:05:49.092+0200 I NETWORK  [initandlisten] waiting for connections on port 27017

Edit2 more detailed logs

A log with journaling enabled: pastebin.com/kKx4SJ98

Journaling disabled: pastebin.com/s2GT71w7

With journaling disabled the CPU usage cuts in half (around 40% - 80%). This all when idle.

  • Have you check this doc? docs.mongodb.org/manual/administration/production-notes/…
    – Antonios
    Jul 8, 2015 at 16:36
  • Good idea - But I can't use numactl in OpenVZ box and also mongo doesn't issue any warning.
    – m1ch4ls
    Jul 9, 2015 at 12:13
  • I think this is the warning they refer to: "WARNING: You are running in OpenVZ which can cause issues on versions of RHEL older than RHEL6" , i would suggest to upgrade to 3.0.6 because there were some issues reported with unpredictable cpu behavior in versions 3.0.4 and below. Do you have a replica set?
    – Antonios
    Jul 11, 2015 at 14:55
  • We are running VMs on Debians with RedHat server cores and according to the support these issues (the ones the warning in the log refers to) were dealt with in 2013. So it shouldn't be an issue now. - I don't have a replica set. - I will update to 3.0.6 just to see if the problems persists - Thanks for your help.
    – m1ch4ls
    Jul 13, 2015 at 10:00
  • I have updated to 3.1.6 nightly and the issue persists. It maybe related to our setup.
    – m1ch4ls
    Jul 13, 2015 at 11:50

1 Answer 1


This is the same issue as described here (for MySQL): High CPU usage from MySQL with no queries at all running

sudo date -s now

Caused by leap second and a bug in the kernel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.