LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-26-2014, 12:47 PM   #1
jbruyet
Member
 
Registered: Feb 2011
Location: North Central Washington
Distribution: Debian, OpenSUSE, Kali, Ubuntu
Posts: 178

Rep: Reputation: 7
Multi-CPU VMs in VirtualBox a bad idea?


Hey all, I'm having a struggle with the performance of one of my VirtualBox VMs. I'm running an Asus mobo with an AMD quad-core processor, 1TB hard drive and 16 gigs of RAM and the VM is Ubuntu running Unity 3D with 10 gigs of RAM on a 160 gig vDisk. I was told the performance issue is probably from using two vCPUs. Specifically, that when there's a second vCPU in a VM the I/O APIC will automatically run and that will slow down I/O calls on the VM so I should only have one vCPU in my VMs. Is this correct or incorrect?

Thanks,

Joe B
 
Old 09-26-2014, 09:24 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,348

Rep: Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977
I almost always add in every real processor I have for the VM or VM's. The system will auto level most times. I never add in more processors than a have, that would only be for some very limited tests.

Not sure what you mean by vCPU. If your system has full hardware support for virtual technologies then the processor will be real. If you system doesn't then it will or can emulate the processor.


Might start with top on both host and client.

Exactly what type of performance issue do you have?

Could it be related to the 3D video and/or host card?
 
Old 09-27-2014, 10:09 AM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,415

Rep: Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285
You don't say what thd guest OS is. In my experience Windows XP will run very badly when given more than one CPU for the reason you mention. Linux and BSD guests all seem fine when I give them 4 CPUs though.
 
Old 09-27-2014, 09:23 PM   #4
jbruyet
Member
 
Registered: Feb 2011
Location: North Central Washington
Distribution: Debian, OpenSUSE, Kali, Ubuntu
Posts: 178

Original Poster
Rep: Reputation: 7
--> jefro, top on the client showed CPU usage spikes of over 200% with averages down around 170-180%. That was with Unity 3D. When I dropped it to Unity 2D my CPU usage went back to normal--40%-50% for opening files and such. I guess it could be the host card. Is there a way to test how hard the video card is working?

--> 273, the client OS is Ubuntu 12.04 (<-- required for a software suite I purchased).

Thanks all, I won't worry about using multiple CPUs on my VMs.

Thanks,

Joe B
 
Old 09-27-2014, 09:44 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,348

Rep: Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977
Darn, I just read a similar post the other day on this video issue. You'll have to go back and see if you can find it. Forgot what it was about the 3D. Maybe I'll remember Monday.

Exactly what 3D software would you run on 12.04? Seems odd you can't migrate to a newer version but it is a pain to get dependencies correct.
 
Old 09-28-2014, 02:06 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,285

Rep: Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991
I had a similar feeling - found this thread.
 
Old 09-28-2014, 07:57 AM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,415

Rep: Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285Reputation: 2285
That's really bizarre. I haven't noticed any slowdown with Ubuntu in a VM and I always give my guests (XP excepted as mentioned above) 4 CPUs (I've an AMD "8 core" FX 8120).
 
Old 09-29-2014, 06:23 PM   #8
jbruyet
Member
 
Registered: Feb 2011
Location: North Central Washington
Distribution: Debian, OpenSUSE, Kali, Ubuntu
Posts: 178

Original Poster
Rep: Reputation: 7
Hey all, the link from syg00's post is my post regarding the same VM. I was having problems, serious problems, with my CPU resources being consumed by the VM. I changed from Unity3D to Unity2D and problem solved. I didn't "need" the Unity3D so it was no big loss to me.

--> 273 & jefro, so since I have a quad-core CPU are you saying I can give my VMs four CPUs?

Thanks,

Joe B
 
Old 09-29-2014, 08:07 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,285

Rep: Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991
 
1 members found this post helpful.
Old 09-29-2014, 09:05 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,348

Rep: Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977Reputation: 2977
hehe, I would have linked that same post.

Yes, unless there is some reason not to, then give every real processor you have to the vm's.

Of course in Intel you may have to decide on HT. I still give the full set of whatever shows on boot. If I see 8 penguins then maybe I may just give 4 to a VM. In reality the host would usually level this all off.

Look, you paid for the processors, use them.
 
1 members found this post helpful.
Old 09-30-2014, 10:18 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177
Indeed. Make the cores available to the VMs unless there's compelling reason not to. It's up to the hypervisor to decide how many cores they actually get, at any particular nanosecond.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VirtualBox - teleport running VMs WarTurkey General 2 09-08-2014 07:40 PM
How to communicate between two VirtualBox VMs running on same host chakra1 Linux - Virtualization and Cloud 5 12-09-2013 03:43 AM
LXer: How To Take Screenshots Of VirtualBox VMs LXer Syndicated Linux News 0 07-16-2012 03:40 PM
[SOLVED] what's the difference between a multi-cpu , multi-core and a multi-thread system ? entz Linux - Hardware 11 12-20-2011 05:49 PM
Good idea/bad idea: interface colors introuble General 5 10-30-2006 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration