Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

This is for discussing general topics about how to use VirtualBox.
Post Reply
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by socratis »

When I setup a new VM, I usually start with the VBox template. But then I almost always enable I/O APIC, PAE/NX, VT-x and Nested Paging, no matter what the template says.

Is there a potential problem with having all of them enabled? I know that there are some guests OSes that have to have some or all of them enabled. The question is if there are any guest OSes that have to have some of them disabled.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by noteirak »

Interesting question...
I know I always enable them as well, and I never came accross an issue. I never installed any old OS tho. The oldest system installed in a VM for me is Win 2003/XP.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by mpack »

There is no best practice. These are simply a description of the motherboard features, and there is no "correct" motherboard. It may be true however to say that newer operating systems (Win7 and later, recent Linux's) will expect modern motherboards and hence will not be well tested on legacy chipsets. OTOH older operating systems may not be able to use (say) IO-APIC efficiently.

The templates are chosen by experts to be most suitable for the selected guest. It's generally IMHO best to stick with the template (*) unless you know otherwise.

(*) Some options like RAM size (not VRAM) and disk size are chosen to be conservative, rather than compatible. You can change these if you know you have plenty of resources.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by socratis »

But you see, that's the issue that prompted my question. I was trying to recreate a VM in order to reply to a user's question and in the recipe for Win2008 (that's a really recent server), it proposes 512 RAM, no I/O APIC and no PAE/NX. If you try the Win7 template, it proposes 512 RAM, no I/O APIC, no PAE/NX. That doesn't sound right. Don't get me started that all of the templates have the boot from floppy(?) option as default! Thank $(Deity) they don't have the 5"1/4 option :D
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by mpack »

I think they expect "modern" to be 64bit, in which case the template will definitely enable IO APIC.

It's possible to configure a 5 1/4" floppy, though not in the GUI.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by michaln »

socratis wrote:But you see, that's the issue that prompted my question. I was trying to recreate a VM in order to reply to a user's question and in the recipe for Win2008 (that's a really recent server), it proposes 512 RAM, no I/O APIC and no PAE/NX. If you try the Win7 template, it proposes 512 RAM, no I/O APIC, no PAE/NX. That doesn't sound right.
As mpack said, this is for 32-bit guests. The defaults are chosen to provide reasonable performance even without hardware virtualization.

The general strategy for the defaults is to provide the minimum hardware features the guest OS requires. The reason is that emulating the "extras" can be very expensive and hurt performance. On the other hand, turning everything on rarely improves performance even on hosts with good hardware virtualization support (esp. nested paging).

Note that this does not apply to the RAM/disk sizes. Again those are reasonable minimums but it's really up to the user to decide how much the guest needs and the host can spare. VirtualBox can't make very good guesses because it has no information about how many VMs might be running simultaneously or what other load the host needs to handle.
Don't get me started that all of the templates have the boot from floppy(?) option as default!
But do they actually create floppy drives for the VMs? I don't think so...
Ramshankar
Oracle Corporation
Posts: 793
Joined: 7. Jan 2008, 16:17

Re: Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by Ramshankar »

As far as "VT-x, Nested Paging" goes, if your CPU supports it, having Nested Paging enabled is always recommended. It means VirtualBox doesn't have to intercept guest page-faults and intercepts cause significant overhead.
Oracle Corp.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Best practices for I/O APIC, PAE/NX, VT-x, Nested Paging

Post by socratis »

That's good to know Ramshankar.

I did a little more digging and went searching in the source code to see what are the suggested values for each OS and version. My source was http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Main/src-all/Global.cpp. I can post an easier to read CSV or ODS version.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply