Enabling ACPI drastically cuts VM performance

Description

I am running compute-intensive tasks on Virtualbox VMs. I find that VMs with ACPI enabled (.vbox file contains <BIOS><ACPI enabled="true"/>...</BIOS>) take approximately 4 times as long to perform a given task as VMs with ACPI disabled.

The problem is completely reproducible. I am running a BOINC (Berkeley distributed computing) app in the VM. BOINC has a built-in CPU benchmark. When ACPI is disabled, the benchmark shows performance of ~1800 MFlops/5500 MIPs. When ACPI is enabled, it shows ~500 MFlops/1400 MIPs. The actual app shows a similar change in speed.

Thanks for the logs! Would it also be possible to get the output of the 'dmesg' command from the guest with ACPI disabled and enabled? That would be really great!

From looking at the logs I can at least say that with ACPI the kernel dynamically changes the PIT frequency, I assume this is the Linux dynamic clocks code. In the non-ACPI case I see a lot of "TM: Giving up catch-up attempt" which is also not that nice because it means that the internal clock is not updated properly. If the Guest Additions are not active you would probably see that the guest clock runs slower or faster than it should.

But I could say more with the corresponding guest kernel logs. Thank you!

Thanks again for the logs. From the guest logs it seems that you should achieve the same performance with ACPI enabled if you add 'clocksource=pit' to the guest kernel command line. Your provided logs show that with ACPI disable, the guest kernel is using the PIT as clocksource and with ACPI enabled it uses the TSC. The guest kernel says that with ACPI enabled, TSC is unstable, I don't know why.

It would be also interesting if you would test 3 BOINC instances because you should always consider a virtualization overhead which means that running 4 guests with one guest CPU each is more than a 4-CPU host can handle properly.

I tried adding "clocksource=pit" to the guest kernel command line, then rebooting with ACPI enabled and again with ACPI disabled.

The benchmark is now the same with ACPI enabled and disabled, but is ~10% slower than it was without the clocksource parameter and with ACPI disabled.

I have not run the BOINC application itself long enough to see what this change does to the actual runtime.

On 3 vs. 4 BOINC instances, I've always gotten good performance with 4 instances, except for this problem (which appeared when one of my VMs got trashed and I needed to recreate it; the default ACPI option these days appears to be "on").