VirtualBox

Opened 9 years ago

Closed 8 years ago

#14024 closed defect (worksforme)

3.4.2. "Processor" tab : relation between host and guest cpu is not clear

Reported by: mirak Owned by:
Component: other Version: VirtualBox 4.3.26
Keywords: Cc:
Guest type: other Host type: other

Description

https://www.virtualbox.org/manual/ch03.html#settings-processor

On the "Processor" tab, you can set how many virtual CPU cores the guest operating systems should see. Starting with version 3.0, VirtualBox supports symmetrical multiprocessing (SMP) and can present up to 32 virtual CPU cores to each virtual machine.

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

The documentation is not explicit about the type of relation there is between host and guest cpu. From explanations I had, there is no relation, and there is no one for one mapping between host cpu and virtual cpu. The VM just picks the specified number of cpu from the host in the settings. From the evasive explanation I receveid, I can't tel what is the allocation strategy at runtime.

Change History (3)

comment:1 by Technologov, 9 years ago

Host OS is responsible for that.

comment:2 by Ramshankar Venkataraman, 9 years ago

Technologov is correct, I can elaborate it a bit.

VirtualBox virtualizes CPUs as threads (in an operating system level). So it is possible to allocate more virtual CPUs than physical ones since, as you yourself quoted, there is no one-to-one mapping/lock-down of a thread to a particular physical core. However assigning as many or more virtual cores than physical cores is not a good idea.

This is because, there is no way we can schedule all guest CPU threads to work simultaneously as it would on a real system as there are simply not enough physical cores free to schedule guest cores on and guest operating system performance will suffer immensely.

As far as the 'allocation strategy' goes - it is left to the job of the host OS scheduler. We have places where we use thread priorities to influence/hint the scheduler to execute/wake-up the thread we want but ultimately it is the host operating system scheduler that does it.

comment:3 by Frank Mehnert, 8 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use