Opened 12 years ago
Closed 9 years ago
#10691 closed defect (obsolete)
Enabling ACPI drastically cuts VM performance
Reported by: | mTi3Ad9vN | Owned by: | |
---|---|---|---|
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 (4)
Change History (12)
comment:1 by , 12 years ago
by , 12 years ago
Attachment: | acpi_disabled_is_fast added |
---|
by , 12 years ago
Attachment: | acpi_enabled_is_slow added |
---|
comment:2 by , 12 years ago
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!
comment:3 by , 12 years ago
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 by , 12 years ago
Oh, and do you run any bigger host load in parallel to BOINC (or several of these BOINC instances in parallel)?
by , 12 years ago
Attachment: | dmesg_with_acpi_disabled.txt added |
---|
by , 12 years ago
Attachment: | dmesg_with_acpi_enabled.txt added |
---|
comment:5 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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.
comment:8 by , 9 years ago
Resolution: | → obsolete |
---|---|
Status: | new → closed |
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.