Should APIC be used on VMs

central-processing-unithardwarevirtual-machinesvirtualization

I'm provisioning some VMware and Virtualbox VMs, both 32 and 64 bit and all my boot commands start with /install/vmlinuz noapic.

Searching for information about APIC etc. around the web doesn't give me a clear answer when to use APIC or not.

Does it depend on the amount of CPU cores the machine has installed?
Should APIC be disabled when used on virtual machines?
Does it depend on special features supported by the CPU?
Does it matter if it's a 32 or 64 bit OS/machine?
Is APIC generally a bad thing, because still unstable?
Does it matter setting noapic in the boot command or will the virtualizer override this anyway?

I've read that some issues related to hibernation/booting etc. can occur when APIC is on, but on the other hand I've also read that nowadays modern machines/OS support APIC well.

Thanks a lot for your feedback on this!

Best Answer

It's 2013 and there's virtually no good reason to disable APIC, and plenty of good reason to enable it.

This may not have been true 15 years ago when APIC was new and not well implemented by various hardware vendors, but that hasn't been the case for a very long time.

Microsoft's explanation (from 2003!) is probably the best I can give you, and I'm surprised you didn't find it since it was linked from Wikipedia's page on APIC.

In essence, APIC is a dramatic improvement over the old PC interrupt system which dates back to the 1980s, allowing for more interrupts and less interrupt sharing. This translates into better performance and the ability to use more peripheral devices, both of which are true whether the machine is physical or virtual.

Rule of thumb is: APIC should always be enabled unless there's a specific reason to disable it, such as using ancient hardware, or virtualizing an old NT/2000 system with a non-APIC HAL.