1

I am running Ubuntu 14.10 64 bit under Windows 8.1 64 bit using VirtualBox 4.3.10. I have an Intel Core i5-2410M CPU, with 2 physical cores and enabled HyperThreading and virtualization.

I have set everything mentioned in this other post:

  • System version set to Ubuntu 64 bit
  • I/O APIC is enabled
  • CPU number of the VM is set to 2 (maximum allowed)
  • VT-x/AMD-V enabled
  • Execution Cap is 100%

When I run a CPU-intensive task in the Ubuntu, it uses CPU on 100% according to the Ubuntu task manager, but under Windows it's only ~70%.

Ubuntu (guest):

Ubuntu CPU usage

Windows (host):

Windows CPU usage

It's not the maximum, if I run CPU intensive tasks on Windows, it reaches 100%:

enter image description here

Ubuntu only sees 2 CPUs with 1 thread per core (running lscpu):

lscpu output

How can I make the virtual ubuntu use all of my CPU power?

hunyadym
  • 119

2 Answers2

1

There a few things that make things appear as they are. Correct me if I got something wrong:

  • HyperThreading appears as two additional cores on your dual-core CPU but will not act as real cores. HT will give you a maximum of 30% performance gain and 10% in real world applications. Full load on your Windows host will never show 100% load on each logical CPU in task manager. Task manager may also hide kernel-space load and only present user-space load.
  • You have presented two logical CPU:s to your VM, which will amount up to 50% total system load on the Windows host.
  • Assuming that 100% load on the guest equals 100% load on each presented logical CPU, you will cause 50% total load on the Windows host and with other things also running, apparently 68% in grand total.

I've been fiddling with virtualization, Windows and Linux for some time (even professionally) and HyperThreading is always causing questions like this. The issue is that new logical cores appear that do not appear to have the same power as proper cores (poor explanation)... Another example is the opposite where the message is that the new CPU:s were so much faster that total system load is only about 50% while the load really is 100%.

0

VirtualBox should have a setting under the Ubuntu "machine" settings, somewhere there are CPU settings where you can change the maximum CPU usage % allowed (and number of cores & some features too). It's probably set to 70% max, change it to higher if desired.

Also, your real CPU may be one of the "funny" intel ones that only has 2 real cores, but "pretends" to have 4 "fake" cores via hyperthreading. Does your windows CPU usage ever reach 100% on all cores? An old hyperthreading CPU I used to have would only ever max out at 100% on one "fake" core, since there was only one real CPU core it could never reach 100% on 2 "fake" cores. But maybe hypterthreading & windows has changed since then....

[Usually hear "Why is my CPU maxed out?" this is a different direction ;-]

Xen2050
  • 14,391