What is the max CPUs on a multi-socket machine?

This is for discussing general topics about how to use VirtualBox.

What is the max CPUs on a multi-socket machine?

Postby marius311 » 26. Jul 2018, 13:12

Hi, the documentation states:
You should not, however, configure virtual machines to use more CPU cores than you have available physically (real cores, no hyperthreads).

Do the number of sockets a machine has impact this rule? Specifically, on a machine with CPUs on multiple sockets, should the max number configured be the total number of physical cores across all sockets, or the number of physical cores on just a single socket?

Thanks.
marius311
 
Posts: 3
Joined: 26. Jul 2018, 13:07

Re: What is the max CPUs on a multi-socket machine?

Postby mpack » 26. Jul 2018, 14:12

If you want to know how many physical cores VirtualBox thinks are available, look at any VM log and search for the phrase "host cores".
mpack
Site Moderator
 
Posts: 36647
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: What is the max CPUs on a multi-socket machine?

Postby marius311 » 26. Jul 2018, 15:18

Thanks for the quick reply. So is it correct to say that the "host cores" is the correct max number of CPUs to run with on any given system?

To give you more info, I'm asking about this in the context of BOINC volunteer computing where we run computations on volunteer's computers via Virtualbox (and thus its not particularly easy for us to check what works on any given system; often if a job fails we may not get a second chance on that particular host because the user uninstalled BOINC).
marius311
 
Posts: 3
Joined: 26. Jul 2018, 13:07

Re: What is the max CPUs on a multi-socket machine?

Postby mpack » 26. Jul 2018, 16:27

Host cores is the sum of the cores across all sockets which represents the maximum number of cores available on the PC. You should not assign all of them to the VM however - the host OS needs CPU time to run host apps, particularly VirtualBox!

You also need to be sure that the cores assigned to the VM will actually be used, because a VM has a switching overhead associated with each core which applies whether or not the core is used, so if it isn't being used then it's purely overhead, meaning that the VM gets slower.
mpack
Site Moderator
 
Posts: 36647
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: What is the max CPUs on a multi-socket machine?

Postby marius311 » 7. Aug 2018, 02:06

Thanks again. One last question as we're sorting this out (btw, if its of any interest to you, you could follow along at https://github.com/BOINC/boinc/pull/2624).

No single running VM should exceed the number of physical cores, but is it OK to run eg two VMs in parallel, each of which is assigned a number of cores corresponding to the number of physical cores on the host? If this is possible, are there performance implications, e.g. could this end up being slower than if we ran the computation performed by each of the VMs sequentially?
marius311
 
Posts: 3
Joined: 26. Jul 2018, 13:07

Re: What is the max CPUs on a multi-socket machine?

Postby mpack » 7. Aug 2018, 08:55

It depends what you mean by "ok". If you try to allocate >= 100% of available CPU to any combination of tasks on your PC then it may have difficulty performing smoothly, but it shouldn't crash. The fact that one or more of the host tasks is implementing a VM doesn't change the basic arithmetic.
mpack
Site Moderator
 
Posts: 36647
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: What is the max CPUs on a multi-socket machine?

Postby socratis » 7. Aug 2018, 09:00

Remember that simple rule:
  • Total CPUs for all your guests + 1 Host CPUs. The host needs at least 1 core to do the resource management effectively.
  • Total RAM+vRAM+overhead for all your guests Host available RAM + some.
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.
socratis
Site Moderator
 
Posts: 27690
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 8 guests