How to take full advantage of my CPU on VirtualBox?

4

I'm running Windows XP through VirtualBox on my i7-3610M laptop (Windows 7 Ultimate 64-bit). I've already assigned 8 CPUs plus 100% execution cap plus 4 GB RAM to the VM, but I don't think it's getting the most out of the 3610M because even when programs are exhausting the XP guest with 100% CPU usage as shown in its Task Manager, it never goes over 20% as shown in the host's (Windows 7) Task Manager.

How should I configure the VM to make full usage of the CPU?

Shane

Posted 2012-09-11T11:25:16.513

Reputation: 73

32-bit Windows XP cannot even allocate 4GB of memory. Your current settings are the capacity of a 32-bit oeprating system. – Ramhound – 2012-09-11T11:29:11.117

3

@Ramhound Windows XP x86 can address up to 4GB of RAM. It can only allocate 2GB per process (3GB if certain conditions are met), but the system itself can access 4GB, minus any hardware mapped memory. And the question is asking why the guest appears to have CPU limitations, not RAM.

– Bob – 2012-09-11T11:55:46.520

1

@Shane Do all 8 assigned cores appear in the XP task manager? If not, it may be related to this question.

– Bob – 2012-09-11T12:07:45.430

Why not just use another Win7 x64 version in a VM? – Breakthrough – 2012-09-11T12:27:45.177

@Breakthrough Maybe he is using a program that can only be run on XP. Maybe he is testing out a security feature or something for his workplace. If he wants to run Win XP, he can. He already has a Windows 7 comp... and most use a VM to usually run other computers besides what they already have. – cutrightjm – 2012-09-11T16:41:33.140

1@Bob: Thanks a lot mate! Problem solved by hacking XP with devcon, now all 8 assigned cores finally showed up in the task manager! Funny thing is although the CPU usage can now shoot up to as high as it needed, I don't see much performance improvement and sometimes the XP even lags down the host os (win 7 64bit) a little bit. I guess XP isn't that good when it comes to multiprocessor management. – Shane – 2012-09-12T10:15:22.627

@Breakthrough: I'm testing my programs on XP. – Shane – 2012-09-12T10:16:15.357

Answers

4

Windows XP Pro is limited to two CPUs (but each of them can have multiple cores).

If VirtualBox simulates 8 single-core CPUs 2 can only be used which would result in a maximum of 25% which is very near to what you have observed.

Therefore if there is no option to tell VirtualBox to simulate 2 hexa-core CPUs instead of 8 single core CPUs you can not use Windows XP.

If you need an older Windows-OS that can make use of multiple cores better use Windows 2003 Enterprise Edition which can handle up to 8 individual CPUs.

Robert

Posted 2012-09-11T11:25:16.513

Reputation: 4 857

2

The VirtualBox documentation implies it exposes cores, as opposed to physical CPUs. There is a related question on what may be an XP bug. Edit: confirmed that VirtualBox 4.1.20 exposes cores. Just tested, 8 cores working on a Windows 7 Professional guest, which is limited to 2 physical processors (i.e. processor sockets).

– Bob – 2012-09-11T11:58:06.143

This is helpful info - but I'm still not sure why his XP is sluggish - I can run my XP just fine on 1 core of a 2.1GHz processor. – cutrightjm – 2012-09-11T16:33:39.877

-1

config.vm.define "box1" do |box1|
box1.vm.box = "ubuntu/trusty64"
 box1.vm.provider "virtualbox" do |vb|
  vb.customize ["modifyvm", :id, "--cpuexecutioncap", "100"]
  end
 end

Ravikumar Wagh

Posted 2012-09-11T11:25:16.513

Reputation: 1

1Please explain your answer – Greenonline – 2017-06-10T05:36:08.457