building a physical machine motherboard/processor/host OS suggestions

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Steviebone
Posts: 7
Joined: 14. Sep 2021, 09:17

building a physical machine motherboard/processor/host OS suggestions

Post by Steviebone »

I need to build a physical box to host a few virtual servers/machines. My first question is the need for Windows host (which seems to waste alot of resources/memory). Can Windows guests be run reliably on other hosts like Ubuntu? Or am I better off buying more cores and memory and running windows servers on a Windows host?

If so, whats the best Windows OS to run as a host? Will a Win7 box outfitted with sufficient RAM/cores work reliably? Hate to waste a licensing fee on a Windows server for just a host. I'm not a fan of Win10 tho.

How much overhead should I allow for the host (cores/ram)? In other words, if I have a physical server that runs using 16 GB ram on 4 cores/8 threads at about 80% capacity, how much more capacity do I need to get the same performance from a virtual machine? The server is script driven web that is processor intensive.

Finally, any suggestions on motherboard/processor combos suitable for this application is appreciated. I have traditionally used Intel, but they do seem a tad more expensive. Those of you running Windows servers using virtualbox please tell me about your rigs...

Thanks in advance for any input...
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: building a physical machine motherboard/processor/host OS suggestions

Post by mpack »

Generally speaking the VM doesn't care what the host is. Any supported host OS will do, a list of them are in the user manual section 1.4.

If you want a Windows host then your only practical choice at this moment is Windows 10 (1709 and later). Win7 is no longer supported, Win8.1 is still supported but nobody really cares about that. There are also Windows Server hosts, but unless you are a business user then that probably isn't a consideration.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: building a physical machine motherboard/processor/host OS suggestions

Post by scottgus1 »

The best family (Windows, Mac, Linux, Solaris) of OS to run on the host is the one you're familiar with using. Non-server Windows host OS's (like 10) work just fine for the host. Pro can turn off forced reboot of Windows Updates using the Group Policy Editor, though I'm not sure if you can pick and choose the updates like Server OS's probably can. I have manual download of updates enabled on my 10 Pro GPO, so I don't get unexpectedly rebooted, and I take Macrium disk image backups before running the updates so I can roll back. Waiting a few weeks after Patch Tuesday to see if the web blows up over a bad update is a good idea. Don't web-browse or open suspicious emails on the host. (For me, 10 is a lot like 7, if one looks past the eye candy.)

Performance in any virtual machine from any hypervisor will not be as good as the VM's OS installed on the bare metal instead. The host OS has to schedule itself and the VM(s) through the CPU, and some slowdown is to be expected. How much? I haven't benchmarked it myself. But I have not noticed stupendous slowdowns in my VMs. Maybe 95-ish percent, eyeballed? You could make a few tests. Not a "benchmark" program, though, the timers they rely on are virtualized and can be wrong. Crunch some numbers, like calculating pi to a quadrillion digits or transcode a video, something that can be repeated and timed with a stopwatch. Try the same process a few times on the host without a VM running, and then again a few times inside the VM. Use an SSD so storage is not a bottleneck. That should give you an idea of the percentage of slowdown from running in a VM.

You can counteract the percentage slowdown by forking for a faster host computer.

The "processors" in a VM are actually threads on the host OS. Forum gurus report that hyperthreading does not count for the number of "processors" you can set for your VMs, though you should still keep the hyperthreading on the host CPU enabled.

Forum advice is to not give a VM more "processors" than it has data to push through. A four-processor VM that runs a typical modern OS like Windows 10 may run a bit slower than a two-processor 10 VM, because the two processors' worth of data that 10 generates has to be spread among four threads by the scheduler, which slows the data down. When you add multi-processor-enabled 3rd-party programs to the VM that generate more threads in the VM, then more VM processors can help.

Optimum guest core provisioning is: all guest cores + 1 for the host <= total non-hyperthreaded core count. The guests do not actually "take" the cores from the host, but they can fill up the cores. If the host doesn't have a free core that no guest running at 100% can access, then the host can get unstable. (This is a little flexible: I have run 2 two-core guests and a 1-core guest, total 5 cores for guests, on a four-core host and had no trouble. The reason for no trouble was because the guests weren't all 100% at the same time. If they did, the host would go south. It's a risk assessment.)

The more memory the better, it's simple addition: whatever each guest is set for + what the host needs to operate nicely <= amount of host memory in the RAM sticks. As a starting point the host should have 4GB for itself if it only runs VMs and not other 3rd-party apps. Add each VM's RAM beyond the 4GB for the host.

For storage, don't try more than two modern OS's on a spinning-platter drive, host or VM. Three or more will swamp the drive. SSD's don't have this limitation.

I ran a server-class computer with dual-six-core hyperthreaded Xeons and 48GB RAM, running Windows 7 Pro as a host OS, and 5 Virtualbox VMs:
Small Business Server for domain controller, Exchange server, file & print server (4 processors)
Antispam VM (2 processors)
LOB database apps VM (2 processors)
2 Windows 7 work environment VMs for if a co-worker's workstation went down. (2 processors each)

It ran solid for several years. I had it do automatic scripted VM shut-down, backup the VMs to on-site and off-site locations with confirmation of the backups via FC file-compare and SHA256 hashing, then auto-restart of the VMs. On-site backups included to two workstations that could double as replacement hosts if the main host went down. On-the-fly data backups also ran in the file server VM, sent out to on- and off-site, so if the whole building was destroyed we would only lose a half hour's data max. (I thin that's 4 and a half 9's?)
Steviebone
Posts: 7
Joined: 14. Sep 2021, 09:17

Re: building a physical machine motherboard/processor/host OS suggestions

Post by Steviebone »

Thank you for the detailed explanation!

I loathe Win10 because of the update thing. My test VM was running in windows 7 as a host and running a version of server as the guest. The image came from a machine running Windows server with 16gb ram with four cores/ eight threads. Memory useage can run as high as 86% peak so a littlte more memory may be needed just for that guest. The OS host seems to take up 4 by itself, with 8 being better. So I'm thinking 32 is a starting point with 16 more for each vm added.

On the test config, although the machine ran, it was too slow and couldn't keep up. But the test machine was 4 core, no hyperthreading with only 16 gb of ram. It was no where near enough power. I tried setting the cores to three in the guest with one for the host. Still said to lower the cores.

You are saying the hyperthreading doesn't work in the VM? So I need true core count? Is hyperthreading not relevant at all then?

Another issue with the test was that the VM itself was running from a HDD. The host OS was running from SSD but not the VM. The web app is data (disk) intensive so this may have been the bottleneck.

So to get the same performance I might need at minimum a 10 core machine with 32 GB of RAM minimum, 64 would be better. And I will likely need to add at least one more VM running a Win 7 box as a workstation, so may be even more.

With regards to OS host, like I said earlier, I hate everything about Win 10's update policy. I'm not familiar with Linux or Ubuntu but maybe I better get familiar. I would use the Win 7 workstation as the host but if it is no longer supported by Vbox... If I had an unlimited budget I would license another WinServer, but that seems like overkill.

What are the differences between the other hosts?

And, what motherboards/processors are people using?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: building a physical machine motherboard/processor/host OS suggestions

Post by scottgus1 »

Steviebone wrote:what motherboards/processors are people using?
This'll probably be an even split between Intel & AMD. There is a topic going about differences between the two families' performance viewtopic.php?f=2&t=103488 But I don't think it's pinned down yet. I have run both as hosts, not sure of benefits one over the other.
Steviebone wrote:VM itself was running from a HDD. ... The web app is data (disk) intensive so this may have been the bottleneck.
Gotta go SSD. My wife's old laptop became the fastest computer in the house when I swapped in an SSD.
Steviebone wrote: I need true core count? Is hyperthreading not relevant at all then?
That's been the forum advice. You could try overprovisioning multiple VMs' processor counts on a test host, run them all full throttle down the trench to keep the fighters off their tails, and see which one hits the host's exhaust port first. Maybe hyperthreading will help.

Extra host cores and RAM can be beneficial if the war chest allows it. Can't put in more cores too easy, but not using a couple is not hard.

I get it about 10's update policy. (I suspect that Microsoft got tired of being the world's No 1 virus vector and got a bit iron-fisted about the fix.) If you run Home, you're screwed. But with Pro I've been able to hold off monthly updates with GPO until I'm ready, and there is no need to do the Feature Updates for a few years. If you keep the host OS off the web and only allow internet in the VMs, you might be able to never update the host. And unless you're willing to stay on 5.2.x or 6.0.x for the host OS, which are still good for Windows 7 hosts, you might have to bite the bullet. (Note that if the host stays off the web, 7 and 5.2/6.0 would be fine, until a VM OS that requires post 6.0 comes out.)
Steviebone
Posts: 7
Joined: 14. Sep 2021, 09:17

Re: building a physical machine motherboard/processor/host OS suggestions

Post by Steviebone »

This'll probably be an even split between Intel & AMD. There is a topic going about differences between the two families' performance viewtopic.php?f=2&t=103488 But I don't think it's pinned down yet. I have run both as hosts, not sure of benefits one over the other.
AMD is cheaper of course. I've always been an Intel man tho. I've a few AMD boards die. Never had a good intel board die. But that may be just dumb luck.
Gotta go SSD.
Yeah, the physical Windows server now running is entirely SSD. It made a huge difference. The app is a dataminer that is constantly reading numerous (100s) of large databases per thread, usually for or five users at a time. In fact, the SSD's on that machine are mirrored. So the VMbox would need to be the same.
Extra host cores and RAM can be beneficial if the war chest allows it. Can't put in more cores too easy, but not using a couple is not hard.
Good point. Gotta think forward. I'm on a budget tho of course. Gotta find the right balance.
I get it about 10's update policy.
Yeah, there are a million reasons I dont want to use Win 10. I'm running 6.1 on Win 7 at the moment. Never thought to check for compatibility. If it's dead going forward... I'm thinking ubuntu or linux to keep costs down. They have much less overhead too I believe. But are there performance issues there? Will a Windows guest really run as efficiently on a foreign host?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: building a physical machine motherboard/processor/host OS suggestions

Post by scottgus1 »

Steviebone wrote:the SSD's on that machine are mirrored. So the VMbox would need to be the same
While you could make two disk files for the VM, you don't need to. I'd let the host handle RAID, and make one disk file on the redundancy'd disk for the VM. (The 7 host I mentioned above had 3 RAID1 mirrors, and the VMs had single drive files on the mirrors. RAID was handled by the host not the VM.)

6.1 is not supported on 7 hosts anymore. It may still work, but bugs won't be fixed. That said, if you can settle on a good setup, then no need to change it, per the "if it ain't broke" paradigm.

The guest OS is completely independent of the host OS. Windows VMs run under Linux hosts all the time, take a look through the Linux Hosts forum. If you're comfortable with Linux, it'll work a treat as a host for the Windows VMs.
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: building a physical machine motherboard/processor/host OS suggestions

Post by fth0 »

Steviebone wrote:You are saying the hyperthreading doesn't work in the VM? So I need true core count? Is hyperthreading not relevant at all then?
I'll try and address these questions, starting with providing some background knowledge:

Generally speaking, Hyper-threading (HT) only doubles selected parts of a CPU core, and in the past, Intel claimed up to a 30% performance improvement when comparing a CPU core with and without HT. Of course, technology has advanced since then, and the performance improvement could be higher nowadays. But the main takeaway is that one CPU core with HT is inferior than two CPU cores without HT, and it depends on the type of workload, how much.

When running a VM, the VirtualBoxVM process creates 42-ish (*) threads, among them one thread for each of the <n> vCPUs provided to the VM, and lets the host OS schedule these threads on the host CPU(s). Since there is no fixed assignment between the <n> vCPUs and the host CPU cores, the guest OS is told to have a CPU with <n> cores without HT.

That being said: If you provide more vCPUs to the VM than you have CPU cores on the host, the corresponding threads will interfere with each other when being scheduled on the same host CPU core, unexpected for the common user. This is why the colors of the vCPU slider in the VirtualBox Manager and the forum regulars generally advise against it. If you do have a host CPU with HT and provide more vCPUs to the VM, and really utilize them in the VM, the performance will usually be higher, though. Just not as high as when using a host CPU with twice as many cores without HT.

(*) When I counted the threads of the VirtualBoxVM process of a VirtualBox VM with 2 vCPUs for the first time, I counted exactly 42 of them. Kudos to Douglas Adams. ;)
Steviebone
Posts: 7
Joined: 14. Sep 2021, 09:17

Re: building a physical machine motherboard/processor/host OS suggestions

Post by Steviebone »

Makes perfect sense. Last question then... can hyperthreading actually interfere with efficient operation of VMs? Or at the very least, since the cores are assigned without HT, irrelevant and unnecessary?

Thanks again for all your help!
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: building a physical machine motherboard/processor/host OS suggestions

Post by scottgus1 »

Steviebone wrote:can hyperthreading actually interfere
I don't think so. I have heard that turning off hyperthreading on a processor that has it can detrimentally affect performance. Best to leave it on.
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: building a physical machine motherboard/processor/host OS suggestions

Post by fth0 »

Steviebone wrote:Last question then... can hyperthreading actually interfere with efficient operation of VMs?
Yes (*), but the more important question IMHO is: When does it matter? ;)

Consider a program/process with 8 threads, each capable of fully utilizing a CPU core for 5 hours. On an 8-core CPU without HT, the program will use 8 * ~100% CPU core capacity and run for ~5 hours. On a 4-core CPU without HT, the program will use 8 * ~50% CPU core capacity and run for ~10 hours. On a 4-core CPU with HT, the program will use 8 * ~65% CPU core capacity and run for ~7 hours and 45 minutes (note that 2 * 65% equals 130% or +30%).

I'd assume that using HT will add a small additional cost, bringing the ~65% a little bit closer to the ~50%. (Of course, one could deliberately write a program that brings it down all the way to the ~50%.) Additionally, for the 4-core CPU with HT, VirtualBox has to manage 8 vCPUs (if provided to the VM), which adds to the overhead on the CPU cores used by the host OS to execute the "rest of the" VirtualBoxVM process.

Modern host OSes try to schedule the threads on the host CPU cores (with HT enabled) in such a way that only one thread is running on one CPU core at a time, if possible. If you provide less vCPUs to the VMs than you have CPU cores available, the HT overhead should be relatively small, but nobody has ever measured that AFAIK.

(*) I don't really want to dive into the details here, because it gets much more complicated quickly, and the special effects on virtualization are mostly unknown (to me at least). For the interested reader: One of the topics would be the CPU caches ...
Steviebone
Posts: 7
Joined: 14. Sep 2021, 09:17

Re: building a physical machine motherboard/processor/host OS suggestions

Post by Steviebone »

Sounds like my best bet is to get enough cores, plenty of RAM and leave hyperthreading alone... I might be able to save a few dollars on a MB/CPU without hyperthreading but is it necessray? The difference is likely negligible in dollars. Seems like a need 12 cores and 48 or 64 MB Ram. Any thoughts on specific mbs/cpus? My feeling is that I need to introduce myself to Linux or Ubuntu as a host to save wasted resources on a host and licensing fees. The only downside I can see there is it might be more of a hassle transferring files to the guests since the file systems are different, right?

I really appreciate your help. Thanks for your patience.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: building a physical machine motherboard/processor/host OS suggestions

Post by scottgus1 »

Steviebone wrote:might be more of a hassle transferring files to the guests since the file systems are different, right?
No. The file systems will be different, but the host or VM OS will handle the differences. A file is still the same regardless of file system.

You should be able to transfer files very easily, especially if you use real shared folders from the host to the VMs over the network. (Virtualbox Shared Folders are also available, if Guest Additions are installed in the VMs. But they tend to be strictly for file copy. Whereas a real shared folder over a network can do anything a shared folder can normally do.)
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: building a physical machine motherboard/processor/host OS suggestions

Post by fth0 »

I cannot recommend specific mainboards or CPUs, but personally I still prefer Intel over AMD CPUs (call me old-fashioned ;)), and Linux over Windows as host OS (I'm using both as host and guest OSes). You could choose some current Intel Xeon CPU with or without HT, just don't count the HT and see how many CPU cores you get for the money.
Post Reply