Macos – VirtualBox headless caused high CPU load on Mac OS X

headlessmacmacosvirtualbox

When I run a CentOS linux VM on VirtualBox in headless mode the CPU continuously spikes up to about 80% for a couple of seconds at a time with a short 1 or 2 second gap and then does it again. Even with the machine idling, no other application running and the CentOS system doing nothing. If I change it and run it normally, e.g. head mode, then this effect doesn't happen. It would appear to be the opendirectoryd, cfprefsd and notifyd along with the VBoxHeadless process causing the majority of the load during the spikes.

I have tried this on two MacBook Pro's both running Mac OS X 10.9.3 and it has the same effect on both.

Has anyone else observed this behaviour and know how to prevent it?

Activity monitor showing cycling CPU spikes

Best Answer

I'm seeing this with both headless and normal mode.

A workaround for me is just to stop opendirectoryd:

sudo launchctl stop com.apple.opendirectoryd

Sadly, something restarts it.

This config tweak is currently working for me: https://superuser.com/a/426719/418576

Related Question