VirtualBox

Ticket #10691 (new defect)

Opened 22 months ago

Last modified 22 months ago

Enabling ACPI drastically cuts VM performance

Reported by: mTi3Ad9vN Owned by:
Priority: major Component: VMM
Version: VirtualBox 4.1.16 Keywords:
Cc: Guest type: other
Host type: other

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.

Disabling ACPI (by stopping the affected VM, exiting the VirtualBox GUI, killing VBoxSVC, editing the VM's .vbox file, and restarting the VM) fixes the problem immediately.

Virtualbox is v.4.1.16.

Host OS is Win 7 Ultimate SP1.

Guest OS is Ubuntu 10.04 LTS.

Attachments

acpi_disabled_is_fast Download (80.3 KB) - added by mTi3Ad9vN 22 months ago.
acpi_enabled_is_slow Download (53.0 KB) - added by mTi3Ad9vN 22 months ago.
dmesg_with_acpi_disabled.txt Download (22.9 KB) - added by mTi3Ad9vN 22 months ago.
dmesg_with_acpi_enabled.txt Download (24.7 KB) - added by mTi3Ad9vN 22 months ago.

Change History

comment:1 Changed 22 months ago by frank

Please attach a VBox.log file. I'm interested in your complete VM config. Also, there is no need to edit the .vbox file manually, VBoxManage modifyvm VM_NAME --acpi on|off should be preferred.

Changed 22 months ago by mTi3Ad9vN

Changed 22 months ago by mTi3Ad9vN

comment:2 Changed 22 months ago by mTi3Ad9vN

I've attached logs from when ACPI is disabled and when it's enabled.

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.

P.S. Thanks for the modifyvm command!

Last edited 22 months ago by mTi3Ad9vN (previous) (diff)

comment:3 Changed 22 months ago by frank

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!

comment:4 Changed 22 months ago by frank

Oh, and do you run any bigger host load in parallel to BOINC (or several of these BOINC instances in parallel)?

Changed 22 months ago by mTi3Ad9vN

Changed 22 months ago by mTi3Ad9vN

comment:5 Changed 22 months ago by mTi3Ad9vN

OK, I attached the dmesg logs. And yes, I generally run 4 of these VMs with one BOINC task in each. I did not change that when flipping the ACPI switch back and forth.

comment:6 Changed 22 months ago by frank

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.

comment:7 Changed 22 months ago by mTi3Ad9vN

Thank you for the diagnostic help.

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").

BTW, I've also noticed that the host OS does not cleanly shutdown if ACPI is DISabled, irrespective of the clocksource parameter. It just hangs at the "Ubuntu" five-dots screen.

Last edited 22 months ago by mTi3Ad9vN (previous) (diff)
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use