I've been using Vagrant/virtualbox on a relatively new laptop with decent specs (16GB memory, Intel i7 4710HQ cpu, dual m-sata SSD).

So far, with every guest I run, I encounter really high latency, where keystrokes over SSH are echoed seconds later. (I did take check the usual SSH connection issues with reverse DNS lookup and GSSAPI auth, they do not apply and would only affect the initial connection.)

Meanwhile (and at other random times) one core will spin up to 100% utilisation, which is all spent by VBoxHeadLess inside select().

$ ps -o time -p  5257; time sudo strace -c -p 5257 ; ps -o time -p  5257
Process 5257 attached
^CProcess 5257 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 99.95    3.214696      128588        25           select
  0.03    0.000822          29        28           read
  0.02    0.000521          23        23           futex
  0.01    0.000413          21        20           sched_yield
------ ----------- ----------- --------- --------- ----------------
100.00    3.216452                    96           total

real    0m3.81s
user    0m0.00s
sys     0m0.01s

$ ps -fp  5257
henk      5257 25788 45 16:34 ?   00:18:20 /usr/lib/virtualbox/VBoxHeadless

Note the ps -o time output:

00:23:51  (before)
00:23:55  (after)

Combined with the time ... result of 3.81s., this confirms that the process is actually spending all of its time in the kernel, just waiting for events.

Meanwhile, the host kernel appears to be spinning on a lock in order to resolve that select().

I've used virtualbox/vagrant on a more modest i5 laptop, with the same ubuntu 14.04, and never saw this kind of behaviour.


  1. How can I dig deeper to find out the cause of the excessive cpu wasted here?
  2. Is anyone familiar with similarly slow responding virtualbox guests?


After a reboot I'm not able to run my boxes without issues. Possible explanation: I may have installed a kernel update without rebooting.

I also eliminated a potential issue with conflicting virtualisation modules. Yesterday I did remove the kvm modules from the kernel, without any improvement. Today the modules are back after the reboot, but with no impact on vbox performance.

  • Possible answer to item 1: Use the linux kernel ftrace facility as promoted by Brendan Gregg. I will investigate this later, if the issue surfaces again. Commented Mar 24, 2015 at 17:37
  • I do encounter the same issue with VirtualBox 5.x. SSH is terribly slow with latency issues all over the place. Usually this happens after I type the second command or half the first when I type it. It is slow to show what you type and slow to respond :(
    – Kounavi
    Commented Oct 4, 2015 at 22:49
  • Update: I changed jobs, and the laptop, which was my employer's has passed on. End of story, for now. @Kounavi - any details on the cpu type and OS? Commented Oct 4, 2015 at 23:13
  • It's on a Surface Pro 3 (i5 & Windows 8.1 x64). I'm trying on a desktop to replicate this.
    – Kounavi
    Commented Oct 5, 2015 at 11:09


You must log in to answer this question.

Browse other questions tagged .