i7-4790, 8GB Ram, Windows 7 HP
VM: Windows XP 32, 1024 RAM
When i leave System > Processor set to 1 CPU i have exactly enough power to run one of my mirc scripts at near 100% usage on the VM.
I then set System > Processor to 4 CPUs but find on the VM that I have no more power, cannot run 4 mirc scripts, and 1 runs the machine to 100% cpu usage just as before.
Double checked my settings and math... still no idea why 4 CPU wont deliver to my VM 4 times the power.
How do i get my VM to pull more power from my ample supply?
4 CPUs - no more power
4 CPUs - no more power
Last edited by Rob0 on 8. Jun 2015, 23:13, edited 1 time in total.
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: 4 Processors - no more power
As a general rule, you will get the best performance by assigning no more than n-1 cores to a guest where n=physical cores. One reason is because if you assign all physical cores to a guest, the host will have no cores for itself. Performance should actually be worse with all cores assigned to a guest. The other issue is, most applications aren't written to take advantage of multiple cores.
Some info on multi-core processors: http://en.wikipedia.org/wiki/Multi-core_processor
Some info on multi-core processors: http://en.wikipedia.org/wiki/Multi-core_processor
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
-
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: 4 Processors - no more power
You must leave one or more CPUs for the host, otherwise performance will go down, not up. Yours is a 4 core CPU, so the max you can usefully give to VMs is 3.
Also, assigning multiple cores to a VM will not help if the guest OS or app doesn't use them (e.g. if you installed XP with a single core HAL). But, the extra context switching overhead still is incurred, so again performance will go down rather not up.
And even leaving all that aside, most real world programs do some kind of I/O, e.g. the access the disk, screen and network. There is usually only one of each of these, and if the process I/Os collide, performance will go down and not up.
Performance is not a simple linear function of the number of CPUs you throw at the problem.
Also, assigning multiple cores to a VM will not help if the guest OS or app doesn't use them (e.g. if you installed XP with a single core HAL). But, the extra context switching overhead still is incurred, so again performance will go down rather not up.
And even leaving all that aside, most real world programs do some kind of I/O, e.g. the access the disk, screen and network. There is usually only one of each of these, and if the process I/Os collide, performance will go down and not up.
Performance is not a simple linear function of the number of CPUs you throw at the problem.
Re: 4 Processors - no more power
Pardon my incorrect explanation.
It is 4 of 8 CPUs, and there was no shortage of power on the host system.
Normally running the same host computer with XP natively and no VMs i can run 6 or 7 of these mirc script units. Each one only ever uses 1 CPU, 4 running 4 CPUs -- natively. But on VM set to 4 of 8 CPUs I cannot get any better performance from the VM than when it was set to 1 of 8 CPUs. I can only run one mIRC and see the VM go to 100% processes whether I am set to 1 CPU or 4 cpus. Is the CPU switch merely aesthetic? I need 4 times the power out of this VM how do I get it?
And the i7-4790 is a common single processor quad core design on an MSI z97 PC Mate mobo.
It is 4 of 8 CPUs, and there was no shortage of power on the host system.
Normally running the same host computer with XP natively and no VMs i can run 6 or 7 of these mirc script units. Each one only ever uses 1 CPU, 4 running 4 CPUs -- natively. But on VM set to 4 of 8 CPUs I cannot get any better performance from the VM than when it was set to 1 of 8 CPUs. I can only run one mIRC and see the VM go to 100% processes whether I am set to 1 CPU or 4 cpus. Is the CPU switch merely aesthetic? I need 4 times the power out of this VM how do I get it?
And the i7-4790 is a common single processor quad core design on an MSI z97 PC Mate mobo.
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: 4 CPUs - no more power
You don't seem to understand the difference between cores and threads. The i7-4790 has 4 cores, not 8. It has 8 threads. Threads are not CPUs.
FWIW, when you run your scripts natively, you are not running your scripts, your OS, VirtualBox along with a second OS. They all require CPU time.
FWIW, when you run your scripts natively, you are not running your scripts, your OS, VirtualBox along with a second OS. They all require CPU time.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
-
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: 4 CPUs - no more power
... and presumably when XP is installed natively on such a processor it will select the multiprocessing HAL.
Many people make the mistake of increasing the CPU count of an XP VM after installation, in which case XP will not use the additional CPUs. If you've done this then you should Google for how to change the HAL of an already installed XP system.
Many people make the mistake of increasing the CPU count of an XP VM after installation, in which case XP will not use the additional CPUs. If you've done this then you should Google for how to change the HAL of an already installed XP system.
-
loukingjr
- Volunteer
- Posts: 8851
- Joined: 30. Apr 2009, 09:45
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: just about all that run
Re: 4 CPUs - no more power
I was one of those people when I first installed XP as a guest. I figured out something must be wrong since while watching the CPU behaviors they were always identical.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
There are three groups of people. Those that can count and those that can't.
Re: 4 CPUs - no more power
Yes you are all much cooler than me.
So not possible using a Guest XP VM to access more than 1 thread?
And the CPU switch is likewise for XP merely aesthetic...
So not possible using a Guest XP VM to access more than 1 thread?
And the CPU switch is likewise for XP merely aesthetic...
-
Martin
- Volunteer
- Posts: 2562
- Joined: 30. May 2007, 18:05
- Primary OS: Fedora other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: XP, Win7, Win10, Linux, OS/2
Re: 4 CPUs - no more power
Was your XP VM set to only one CPU in the VM configuration when you installed XP?
If yes then changing it to more CPUs afterwards doesn't help, because XP selected an Uniprocessor HAL during the installation phase.
When you install a XP guest with a VM definition > 1 vCPU then it selects a Multiprocessor HAL and will use more then 1 CPU.
If yes then changing it to more CPUs afterwards doesn't help, because XP selected an Uniprocessor HAL during the installation phase.
When you install a XP guest with a VM definition > 1 vCPU then it selects a Multiprocessor HAL and will use more then 1 CPU.
-
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: 4 CPUs - no more power
... or when you install XP on such a host then again it selects a multiprocessor HAL, so subsequent performance comparisons with a uniprocessor VM would not make sense.Martin wrote:When you install a XP guest with a VM definition > 1 vCPU then it selects a Multiprocessor HAL and will use more then 1 CPU.
Think about what recipe you used when you created the VM - or simply scrap the VM and install it again with 2 CPUs already selected before you run the XP installer.
Threads are an irrelevant Intel marketing strategy, so lets not discuss them again. Cores are a different matter: XP is perfectly capable of using multiple CPUs (or cores) if that option is selected when the OS is installed.