Less is more with processors?

Discussions related to using VirtualBox on Windows hosts.

Less is more with processors?

Postby wmeyer » 24. Aug 2019, 00:13

In recent releases, I have observed that I seem to get more responsive UI behavior in my VMs when I declare 2 CPUs, rather than 4. It puzzles me, but it has been quite consistent. The host is an Intel i7, with 32GB of RAM, so I am not lacking for horsepower. I would very much like to know whether others have seen similar results. The guest OSes have been Windows 7 and Windows 10. I should also mention that this is a change from my observations in a decade of VBox usage.
wmeyer
 
Posts: 49
Joined: 14. May 2009, 18:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7

Re: Less is more with processors?

Postby mpack » 24. Aug 2019, 09:45

This is not new, it was ever thus. My guess is that it's your habits which have changed, not VirtualBox.

VirtualBox has to save the context of every CPU core you assign to the VM, and swap contexts every time it does a "world switch" to the host or to another VM. In a badly configured VM this function can happen a lot, and it can have a big damping effect on performance.

In an ideal world that switch doesn't happen at all, or at least it happens a minimum number of times. The best way to arrange that is not to give a VM more CPU cores than it needs to run smoothly. The number will be based on user workflow, but yes: 2 is the usual number (allows background functions plus one foreground app). You also don't starve the host PC of the number of cores IT needs to run smoothly (2 again), and you also apply similar balance to RAM allocation.

Best I can say without a VM log to tell me how many cores you actually have.
mpack
Site Moderator
 
Posts: 29714
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Less is more with processors?

Postby wmeyer » 24. Aug 2019, 16:57

Thanks. As you say, perhaps my habits have changed, or it may be that I have been more focused on performance issues in the last year or so.
wmeyer
 
Posts: 49
Joined: 14. May 2009, 18:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: multiOS and 53 guests