Skip to content
April 26, 2013 / Kamil Páral

Testers: Use more CPUs in your VMs, you’ll get more things done

Lately I’ve found out that I can speed up my Fedora 19 testing if I increase the number of CPUs assigned to the VM. This is a short blogpost about it, maybe it will help also others.

By default, this is what a default new VM in virt-manager looks like:

vm-cpu-thumb

There is just a single CPU assigned, out of my 4 host CPUs available (Intel Core i7 processor).

In my completely unscientific benchmark, I tried changing the value and measuring how the boot time of Fedora 19 Alpha Live changes. It was measured from isolinux screen to displaying the Fedora welcome dialog. Of course I used a few warm-up starts first to make sure everything is cached and the results are not affected by the disk access. These are the results:

Fedora 19 Alpha Live boot time

Number of CPUs Boot time (seconds)
1 67
2 48
3 46
4 46

It seems that the boot process of a Live image can be well parallelized. There is a large difference between a single CPU and a dual CPU. Adding more than two CPUs doesn’t help considerably. Quite interestingly, when I tried to measure an installed system, the changes were very small:

Fedora 19 installed boot time

Number of CPUs Boot time (seconds)
1 29
2 27
3 25
4 27

The live image performs a lot of one-shot setup tasks during boot, that’s probably the major difference here.

I didn’t perform any further benchmarks inside the running system, for example Anaconda installation. It might be interesting to compare the installation speed with different number of processors, but I haven’t gotten to it yet (patches welcome:)). But because I boot Live images very often, at least I know that the boot process is significantly improved by using two CPUs in the VM. In my 4 CPU host system that seems as a good number. It doesn’t hog my host down too much, and if I really need it, I can run two VMs in parallel and they will fully utilize my processor potential, at the expense of my host system becoming a bit lagging.

As a side note, as I’ve found out, the default VM memory is 1024 MB. That is quite insufficient, your installation will suffer by a lot of swapping and it will take much longer. For pre-release images with debugging options enabled it might not even succeed. Usually I use 1.5 GB RAM for generic Fedora testing, and 2 GB RAM for pre-Beta testing (which includes debug kernel). With these amounts of memory I find the installation go pretty well. Of course you must have sufficient amount of memory available in your host system.

Also, don’t miss out on my previous blogpost about the speed of different disk bus drivers.

Happy testing!

Flattr this

About these ads

3 Comments

Leave a Comment
  1. fabiand / Apr 26 2013 20:32

    Hey Kamil,

    are you using some tool to automate parts of the testing?

    • Kamil Páral / Apr 27 2013 11:51

      Not yet, no, unfortunately. We had some attempts, but they are somewhat dead now. Jan Sedlák is working on a tool based on OpenCV, I hope we will automate some test cases with it. Which reminds me that this blogpost is useful also for automation tools. The servers are usually pretty beefy, lot of CPU cores. If we spawn the VMs with multiple virtual CPUs, the whole testing process could be sped up.

      • fabiand / Apr 28 2013 11:33

        We came up with Igor – our tool to test oVirt Node (which is actually a LiveCD based on Fedora packages). We’ve got a number of testcases to test our TUI. I now think about giving it a spin to testing the Fedora LiveCD with Igor. Maybe this is interesting for you http://dummdida.blogspot.de/2013/04/testing-ovirt-node-in-4min.html as it gives on first glance of how we test our livecd.

Leave a Reply (Markdown syntax supported)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: