Page 2 of 2
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 17:22
by socratis
So according to your result, the performance will linearly increase as the number of cores approaches the number of logical cores on your machine right? That's what I think as well.
Well, I have "green" up to 8 with a maximum of 16. So, if you venture outside the green zone, performance
will start suffering (at least in my case it was).
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 17:27
by chinhodado
Oh, I saw that you wrote
VM w IOAPIC-4 : 63.8 <- Number of physical cores on my machine
and
VM w IOAPIC-8 : 88.1 <- Number of logical cores on my machine
so I assumed that you have the same config as mine (4 real cores, 8 for hyperthreading)
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 17:38
by socratis
To tell you the truth, I was a little bit puzzled myself as well. Here is what I get on all the VBox.logs:
00:00:01.166695 Logical host processors: 8 present, 8 max, 8 online, online mask: 00000000000000ff
00:00:01.166704 Physical host cores: 4
So, I never quite figured out why I have up to 16 vCPUs with 8 being in the green zone. Just to play it safe I've never assigned more than 4, except that little test I did.
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 17:51
by Perryg
@Socratis,
Does your Mac have a dual quad with hyper-threads? As for the log count, there was a bug in the Intel code that caused this and AFAIK has been worked around in newer version ( maintenance release ). Since I work in the future I can not tell if it has been or when it will be released. That said you have also confirmed what I said about the HT's. Now for benchmarks, there has not been anyone take into account the timing when virtualized. The only true way to test is with timing an intense operation and seeing how long it take to accomplish. Using Linux I test by compiling a program and timing to see how long it takes to finish. Try that and you will see a better depiction of CPU usage and load.
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 18:06
by socratis
Perryg wrote:Does your Mac have a dual quad with hyper-threads?
Model Name: MacBook Pro
Model Identifier: MacBookPro8,3
Processor Name: Intel Core i7
Processor Speed: 2,3 GHz
Number of Processors: 1
Total Number of Cores: 4
Perryg wrote:Using Linux I test by compiling a program and timing to see how long it takes to finish. Try that and you will see a better depiction of CPU usage and load.
Doesn't that involve disk I/O? I was only interested in the pure CPU performance only. The program used was a number crunching program (calculating pi) so I thought that it would take all other factors out of the equation.
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 18:14
by Perryg
Humm, maybe its a Mac thing but the processor count indicates a dual quad. What is the actual model number of the processor.
Your test may very well do what you need. I have not tried that myself. I do know that compiling in Linux is very CPU intensive and maybe a dash of I/O. My point was not to rely on benchmark software as it is not accurate in a guest, but to use real world tests.
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 18:19
by chinhodado
My main use of the VM is compiling code too. So I'll do a test when I have time and post here the result.
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 18:24
by socratis
Perryg wrote:What is the actual model number of the processor.
From the VBox.log:
00:00:01.166643 Full Name: Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz
Re: VirtualBox only uses maximum 50% CPU
Posted: 13. Feb 2014, 18:35
by Perryg
@socretis,
That is a 4 core CPU, and VBox is seeing it as a dual so either you have two actual CPUs or VBox is reporting it wrong. I am not familiar enough with a Mac but isn't there a way to see what you actually have? If in fact you have a single CPU you should post a ticket at
bugtracker and let them know. I also see that you have EPT so it would probably benefit you to enable large pages if you have not already. VBoxManage modify <uuid|vmname> --largepages on
@chinhodado,
That will tell you everything, just go in stages and find the sweet spot. Just be sure to use a timer and not just visual or gut feeling.