#10696 closed defect (invalid)
MongoDB idling at 15-20% CPU usage
Reported by: | lazymanc | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 4.1.18 |
Keywords: | mongodb, cpu, idle | Cc: | |
Guest type: | Linux | Host type: | Mac OS X |
Description
I'm experiencing an issue where mongodb consumes 15-20% CPU constantly when idle. This is especially inconvenient when trying to develop on a laptop as it drains the battery a lot more quickly than necessary.
Details:
- Host: Mac OS X 10.7.4 (mid 2011 macbook air 13")
- Guest: Ubuntu 12.04 server (64-bit) configured with 512mb ram / 8gb sata disk.
- Mongodb installed via 10gen repo as described here: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/
- mongodb monitored using top command
The mongod process idles at 15-20% cpu usage on the ubuntu guest, even when no connections are active. I have converted the same VM image and run it under Parallels and the issue goes away (mongodb idling at 0-1% cpu). Others have mongodb running under vmware and xen and cannot reproduce the issue, so it appears to be specific to virtualbox.
Attachments (1)
Change History (4)
by , 12 years ago
Attachment: | Screen Shot 2012-06-23 at 20.19.12.png added |
---|
comment:3 by , 11 years ago
Hi All,
I have exactly the same behaviour with MongoDB and VirtualBox here.
The Ubuntu 12.04 VM was exported from a KVM machine hosted on CentOs (qemu-img convert -O vdi Ubuntu.qcow2 Ubuntu.vdi) and imported into VirtualBox on Win 7 as a new machine with existing image.
Enverything works normally except the mongo process consuming 10-20% CPU even when no mongo request is performed.
The mongodb log show no difference beteen KVM/VirtualBox...
Calling strace show the same series of 'select' calls on both nodes:
select(13, [11 12], NULL, NULL, {0, 5127}) = 0 (Timeout) select(13, [11 12], NULL, NULL, {0, 10000}) = 0 (Timeout) select(13, [11 12], NULL, NULL, {0, 10000}) = 0 (Timeout) select(13, [11 12], NULL, NULL, {0, 10000}) = 0 (Timeout) ...
@Hachiman/Frank, what log were you requesting ?
screenshot of top