Page 1 of 1

Ubuntu and Virtualbox issues - number of processors

Posted: Wed Sep 05, 2012 10:41 pm
by lonleyppl
Has anyone else run into issues giving Ubuntu 12.04 multiple processors under Virtualbox? I had to add a new virtual machine for a class, and gave it the same specs as my OpenSUSE virtual machine ( 4 procs, 8 GiB of RAM, 10GB HDD) and it just crawled. Remembering something that I learned over the summer, I dropped the number of processors to one and it's back to being speedy-ish. With 4 procs it would take several seconds to load gnome-terminal, and then several seconds to register typing. Moving to one processor made this faster, but if anyone has a workaround I'd love to hear it as this machine is primarily for development and I'd like it to use all the resources I can give it.

Output of uname -a since that may be important for trouble-shooting
Linux nothankyousir 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Wed Sep 05, 2012 11:14 pm
by just brew it!
I recall seeing this issue (slow performance with multiple virtual cores) in the past, but don't remember which combination of guest/host OSes I was using at the time. I just tried giving my 12.04 VM 4 virtual procs; it boots to the desktop in about 10 seconds, and opens a terminal pretty much instantaneously (sub-second).

What's your host OS? Does your CPU support hardware virtualization, and is it enabled in the BIOS? What version of VirtualBox? Did you install the Guest Additions?

My specs: Host is an AMD FX-8150 on an Asus M5A97-EVO, 16 GB RAM, SVM enabled, Ubuntu 10.04 64-bit with all current updates, VirtualBox 4.1.20 with extension pack. Guest is 1 GB RAM, 4 cores, APIC, PAE/NX, AMD-V, and nested paging all enabled, Ubuntu 12.04 64-bit with all current updates.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Thu Sep 06, 2012 1:32 pm
by Flatland_Spider
Out of curiosity, why do you want to give it four procs?

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Thu Sep 06, 2012 1:37 pm
by TDIdriver
Typically I give the VM at least one proc less than the computer actually has. That way at least one is free to do background tasks. I didn't base that on anything other than it made sense, so that might not be the case.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Thu Sep 06, 2012 1:46 pm
by lonleyppl
just brew it! wrote:
I recall seeing this issue (slow performance with multiple virtual cores) in the past, but don't remember which combination of guest/host OSes I was using at the time. I just tried giving my 12.04 VM 4 virtual procs; it boots to the desktop in about 10 seconds, and opens a terminal pretty much instantaneously (sub-second).

What's your host OS? Does your CPU support hardware virtualization, and is it enabled in the BIOS? What version of VirtualBox? Did you install the Guest Additions?

My specs: Host is an AMD FX-8150 on an Asus M5A97-EVO, 16 GB RAM, SVM enabled, Ubuntu 10.04 64-bit with all current updates, VirtualBox 4.1.20 with extension pack. Guest is 1 GB RAM, 4 cores, APIC, PAE/NX, AMD-V, and nested paging all enabled, Ubuntu 12.04 64-bit with all current updates.


Host is i7-2820QM which supports all of Intel's virtualization technologies and they're turned on in BIOS. Paired with 16GiB of RAM on 64-Bit Windows 7 Professional. I have VirtualBox 4.1.20, with extensions, and am trying to give guest 8GiB of RAM, 4 cores, APIC, PAE/NX, VT-x, and Nested Paging.

Flatland_Spider wrote:
Out of curiosity, why do you want to give it four procs?

I like having my virtualized Linux faster than my native Windows. I'd be running Linux natively if not for some certificate policies that I have taken the time to work around yet. Additionally, being able to run a threaded make is really nice for compiling gcc and other programs of that ilk.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Thu Sep 06, 2012 1:51 pm
by ChronoReverse
Since your system has VTD and EPT support, how about just installing the free Hyper-V Server 2012?

From what I hear, even the graphics card can run at native speeds now so both your systems (Win and Lin) can be virtualized and not really virtualized at the same time =D


(I realize this isn't your question. My secret agenda is I want to know how this setup would perform).

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Thu Sep 06, 2012 2:15 pm
by lonleyppl
TDIdriver wrote:
Typically I give the VM at least one proc less than the computer actually has. That way at least one is free to do background tasks. I didn't base that on anything other than it made sense, so that might not be the case.


I'd think this was the case, except I also tried it with only 2 procs, and because of how well my openSUSE VM runs.

ChronoReverse wrote:
Since your system has VTD and EPT support, how about just installing the free Hyper-V Server 2012?

From what I hear, even the graphics card can run at native speeds now so both your systems (Win and Lin) can be virtualized and not really virtualized at the same time =D


I guess I'll have to give that a try. VirtualBox has been my go-to for a while, but I'm open to other options.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Thu Sep 06, 2012 2:30 pm
by bthylafh
Maybe it's Ubuntu? I've got Mint 13 on a VirtualBox VM in Win7 x64, Core i7 CPU. Two virtual cores, it flies. Four virtual cores, it flies. Just for stupidity's sake I fed it seven cores and it still flies.

Have you installed the guest additions? Do you have 3D acceleration enabled and 128MB of guest video RAM? If yes to all those, try switching to 2D Unity, if 12.04's still got that available, or install a different DE like Xfce.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Thu Sep 06, 2012 3:00 pm
by just brew it!
bthylafh wrote:
Maybe it's Ubuntu? I've got Mint 13 on a VirtualBox VM in Win7 x64, Core i7 CPU.

Mint is based on Ubuntu, and I tested on my setup using Ubuntu for both the host and guest. I suppose it could be the specific combination of Windows 7 and the version of Ubuntu the OP is using though.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Fri Sep 07, 2012 12:00 am
by lonleyppl
Bit of an update on how things are going.

After removing it and going through several attempts to re-install, I have it up and running again. No issue with the CPUs or it being slow, but I do run into some rather big graphical issues. When the terminal loads if it's captured mouse/keyboard input, then no lines of text will appear, unless I click on the desktop or some other application to release the mouse/keyboard. This seems to happen whenever the terminal has captured the mouse/keyboard which is a bit of a pain at the moment. It also seems to happen for password prompts (to upgrade to root permissions for a bit).

EDIT:

And for some reason, after no changes it started working. First impressions of Ubuntu are now tainted though. Considering how much they stress that it's easy and works straight out of the box, I've found openSUSE much easier to work with. Also, I hate Unity.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Fri Sep 07, 2012 12:15 am
by kc77
just brew it! wrote:
bthylafh wrote:
Maybe it's Ubuntu? I've got Mint 13 on a VirtualBox VM in Win7 x64, Core i7 CPU.

Mint is based on Ubuntu, and I tested on my setup using Ubuntu for both the host and guest. I suppose it could be the specific combination of Windows 7 and the version of Ubuntu the OP is using though.


This might be it. I use both Windows XP + Virtualbox on 11.04 and I haven't had a problem in a year and a half. Before that I was on 10.04. Again no problems. 12.04 has brought a lot of updated packages with regards to GS. However, I don't believe it's nearly as stable as previous LTS versions. It has more problems than in years past and this could be the OP's issue.

I would try to drop back to 10.04 and see what happens.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Fri Sep 07, 2012 6:00 am
by Flatland_Spider
Did you happen to change the Motherboard Chipset from PIIX3 to ICH9? The ICH9 "chipset" gave me some problems a while back with my Windows 7 VM. It's not the same, but it might help.

Re: Ubuntu and Virtualbox issues - number of processors

Posted: Fri Sep 07, 2012 7:57 am
by lonleyppl
Flatland_Spider wrote:
Did you happen to change the Motherboard Chipset from PIIX3 to ICH9? The ICH9 "chipset" gave me some problems a while back with my Windows 7 VM. It's not the same, but it might help.


I almost changed it, then read the description of the option and decided against it. Regardless, it's working decently now so I guess I'll survive.