High CPU on latest nightly

Kamil Paral kparal at redhat.com
Thu Mar 5 10:18:28 UTC 2015


> On Wed, Mar 4, 2015 at 9:25 AM, Kamil Paral <kparal at redhat.com> wrote:
> >> it's maybe not noticeable in a typical install,
> >
> > I have Core i7-2640M CPU @ 2.80GHz with 4 cores (2 physical +
> > hyperthreading). If I run netinst in KVM with 2 virtual CPUs attached (I
> > assign 2 cores instead of 1 to speed up the installation), my host
> > performance is *devastated*. I can hardly scroll a web page in Firefox.
> > Opening any application takes 5-10 seconds. The longer the installation
> > runs, the worse it gets. If I use Live instead of netinst, everything is
> > smooth and fast. If I disable the spinner animation using that
> > updates.img, it's again smooth.
> 
> That doesn't sound right ... even if the VM would use 100% *all the
> time* it shouldn't have this kind of effects. How are you starting
> your VM? Are you using virt-manager or qemu-kvm in a terminal? The
> "the installation runs, the worse it gets. " does not make sense
> either ... unless your system starts swapping ... how much memory does
> your system have? Does it hit swap when you look at top?
> 
> Not saying we shouldn't fix it ... just can't make any sense of those
> symptoms.

Thanks, drago01, for your interest.

I use virt-manager with default options (virtio devices, qxl+spice), 2 CPU and 1500 MB RAM assigned to the VM. My host has 8GB RAM and an SSD disk. There's no swapping (I actually have no swap).

I was actually quite surprised by the performance hit as well. I made a quick snapshot of htop during installation.

This is with spinner on, during installation phase:
http://i.imgur.com/KaNDqZR.png
and during post-install:
http://i.imgur.com/Tf93BU1.png

This is with spinner off, during installation phase:
http://i.imgur.com/4xbryF0.png
and during post-install:
http://i.imgur.com/pURu412.png

I think the difference lies in several aspects:
* During installation phase, most of the use it single-threaded and there's a lot of IO. During post-install, there are some tasks which are multithreaded (e.g. selinux policy compilation? some gzipping?) and the IO is lighter or none at all during some time periods. That explains why my host system is much more hogged during the end of the installation.
* With the spinner on, not only qemu uses 200-240% CPU all the time, but I also see 30-45% CPU consumed by virt-manager, 25% CPU by Xorg and 10-15% CPU by gnome-shell. I assume this is caused by an extreme number of (probably full-screen) image redraws submitted by the VM, which in turn are submitted by metacity running inside the VM. If you compare this with the run with spinner off, virt-manager+Xorg+gnome-shell CPU consumption is basically zero.

If you add up all the numbers in case of animated spinner, consider that I have just 2 physical CPUs (and the other 2 are just hyperthreading), and imagine I'm trying to browse some ajax-heavy website at the same time, no wonder that my system is completely trashed.

For what is worth, I have seen the same or a very similar behavior on the laptops of my colleagues, so this doesn't seem to be some weird problem with my laptop specifically.


More information about the test mailing list