In the last post, I explored the system calls issued by the ‘gnome-shell’ system. It seems that the interface to the VirtualBox hypervisor may be consuming rather a lot of system time: I’ve regularly seen values of over 40% of CPU time being spent in the kernel.
This is a lot: Out of a dual core system, almost one CPU was being spent doing something other than my work. To put it in perspective, in professional computing, getting a 5% performance improvement is a big deal.
Running under IceWM:
Since I haven’t been able to get a lot of information about what ‘/dev/vboxuser’ actually does, I decided to investigate the performance differences experimentally.
I installed the IceWM window manager onto my VM and re-ran the kernel compile. You can see how to do this here:
http://forums.fedoraforum.org/showthread.php?t=282433
By the way: This article isn’t that clear about how you actually start the Window Manager. Under Fedora 21.5 all you need to do is log out, then click the little gear at the bottom of the logout panel to select the Window Manager you want to use.
It turns out that running under IceWM results in substantially lower system time consumption:
The system time values can be as high as ~25%, but are often around 15%, with lows at around 11%. That’s a big improvement over what I was seeing under Gnome.
Double checking with ‘perf’:
The ‘top’ results are promising, but I’ll double check with the ‘perf’ toolchain:
First of all, with ‘perf top -a’, to get an instantaneous reading of the topmost symbols:
This is much better – the top symbols are still in the kernel, but the amount of time they are consuming is pretty modest – about 14%, compared with about 38% in my earlier post.
Now we can get a longer snapshot with the record / report mechanism:
perf record –call-graph dwarf -a -F 97 — sleep 5
perf report
Here’s the output:
This is substantially different from what I saw earlier. There’s no mention of any VirtualBox symbols or ‘ioctl’ system calls, and the majority of symbols are user-space rather than kernel space.
Root cause?
As always, we need to figure out if we really have a root cause.
The switch between window managers is a fairly large change, but it’s not that big in the context of a full-sized computing environment. The kernel, the user-space code, X11 and the hypervisor are all the same.
Obviously, there is a large range of things that could have changed, but in this case I feel fairly comfortable about having identified the root cause.
Although I’m not an expert in either system, I suspect there is an integration between ‘gnome-shell’ and VirtualBox which is responsible for poor performance under this workload.
The integration is probably quite useful for desktop users: It could possibly be something like clean support for resizing the VM’s window, which is certainly nice to have.
In the past I’ve mentioned that I like cut-down window managers because they are so simple. It seems that this may be another data point in support of that choice.
If you’re old school enough to be happy with a bare-bones computing environment and just want to work efficiently, it may be worth getting rid of the bells and whistles.




