Ticket #5293 (closed defect: worksforme)

Opened 10 years ago

Last modified 9 years ago

Multi-processor VM only uses ~50% of host CPU on dual core system

Reported by: spaaarky21 Owned by:
Component: guest smp Version: VirtualBox 3.0.8
Keywords: Cc:
Guest type: Windows Host type: Mac OS X


I'm running VirtualBox 3.0.8 on a MacBook (the original model) with an Intel Core Duo processor. I have a Windows guest VM setup with VT-x enabled and 2 CPU's. Looking at Windows' Device Manager shows that the guest is seeing two CPU's. However, when the guest is utilizing 100% of its CPU time, the host is only using approximately 50% of its CPU time, which would indicate to me that the VM is not utilizing both of the host's CPU's/cores.


VBox.log Download (45.6 KB) - added by spaaarky21 10 years ago.

Change History

Changed 10 years ago by spaaarky21

comment:1 Changed 10 years ago by sandervl73

  • priority changed from major to minor

The VM will never give you an accurate measurement of host cpu usage.

comment:2 Changed 10 years ago by spaaarky21

Regardless of how accurate CPU usage measurements may be for the guest machine, the point is that when multiple CPU intensive programs (or multi-threaded programs) are running on the guest OS, the VM's process on the host machine never uses much more than 50% of the host's CPU time, which seems like an indication that the VM process is not making very good use of the host's multiple cores. Right?

comment:3 Changed 10 years ago by sandervl73

Well, why not try to run a cpu intensive program that uses both cores and find out? Speculating isn't really useful as I have never seen what you describe.

comment:4 Changed 10 years ago by spaaarky21

I am. That's what I've been saying. No matter what I run in the guest, the VirtualBox process never takes much more than 50% of the host's CPU time. I run a variety of programs in the guest, many of which are multithreaded. The most recent example is encoding videos using ffmpeg. The program is multithreaded, I was using the programs multithreading option and at times I was encoding more than one video at the same time (multiple processes launched from different cmd command prompt windows.) The same sort of tasks max out physical, non-virtualized dual core/processor hardware but nothing I do/use in VirtualBox makes use of more than 50% of the host's CPU.

comment:5 Changed 10 years ago by sandervl73

Could you tell me exactly which program you used so I can try it here as well?

comment:6 Changed 10 years ago by spaaarky21

The problem happens no matter what CPU-intensive program(s) I use simultaneously but the example I gave was running multiple ffmpeg processes. ffmpeg is an open source MPEG encoder with multi-threading. does not have binaries on their site but binaries are widely available online. The command I have been using is below. The -threads 0 option means "automatic" but even if it were running in a single thread, the problem still happens when I encode multiple videos at the same time from separate command prompts.

ffmpeg.exe -i input_file.avs -acodec libfaac -vcodec libx264 -crf 22 -threads 0 output_file.mp4

comment:7 Changed 10 years ago by spaaarky21

Is there anything I can do to help with the research of this issue? This is proving to be a big limitation in running VirtualBox on a multi-core system. VirtualBox is very consistently using 50% of a multi-core host's CPU time when the guest is running very CPU-intensive processes simultaneously.

Is it possible that some VM option is preventing it from using more than one core? Could you somehow provide me with a sample configuration of a VM that does utilize more than one processor/core?

comment:8 Changed 10 years ago by sandervl73

Try 3.0.12 and install the 3.0.12 additions. Your CPU needs a workaround for the IO-APIC overhead and that is included starting with 3.0.12.

comment:9 Changed 10 years ago by spaaarky21

I posted this problem in the forums again and got a couple of quick responses. My Windows was created in VirtualBox 2.x, before the addition of SMP. Since Windows was installed with one CPU/core, it was using a non-SMP kernel. Installing a fresh copy of Windows fixed the issue and VBox is now eating up well over 50% CPU time. Thanks.

comment:10 Changed 10 years ago by spaaarky21

Although, on second thought, even when the guest is idle, it's taking up nearly 100% of the host's CPU time. It is to the point where it is unusable. The host's CPU usage goes to 100% and the guest crawls along. It takes quite a long time to boot Windows and simple tasks like searching for system updates can sit for ages without getting anywhere. I've seen a lot of posts online about this but no real resolution. Do you have any ideas? The new VM I created for the fresh Windows install is configured identically to the only one that ran well but didn't make use of SMP. I am using VirtualBox 3.0.12.

comment:11 Changed 10 years ago by sandervl73

Did you install the 3.0.12 additions? Attach a log for 3.0.12 as well please.

comment:12 Changed 9 years ago by sandervl73

  • Status changed from new to closed
  • Resolution set to worksforme

No reply. Closing.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use