VirtualBox

Opened 14 years ago

Closed 13 years ago

#5293 closed defect (worksforme)

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

Description

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.

Attachments (1)

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

Download all attachments as: .zip

Change History (13)

by spaaarky21, 14 years ago

Attachment: VBox.log added

comment:1 by Sander van Leeuwen, 14 years ago

priority: majorminor

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

comment:2 by spaaarky21, 14 years ago

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 by Sander van Leeuwen, 14 years ago

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 by spaaarky21, 14 years ago

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 by Sander van Leeuwen, 14 years ago

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

comment:6 by spaaarky21, 14 years ago

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. ffmpeg.org 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 by spaaarky21, 14 years ago

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 by Sander van Leeuwen, 14 years ago

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 by spaaarky21, 14 years ago

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 by spaaarky21, 14 years ago

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 by Sander van Leeuwen, 14 years ago

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

comment:12 by Sander van Leeuwen, 13 years ago

Resolution: worksforme
Status: newclosed

No reply. Closing.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use