VM is unbearably slow

Discussions related to using VirtualBox on Solaris hosts.

VM is unbearably slow

Postby jared.harder » 19. Jun 2012, 03:55

I just installed Solaris for the first time on a brand new box and thought I'd give VirtualBox a spin. The install went fine and the wizard was good. When I actually went to start the VM and get the guest installed, it simply takes forever. Like 8 hours to even get to the end of the "Windows is loading files..." progress bar when you first boot from the installer DVD. To the point that even after I got back from work 10 hours later, it still wasn't at an installer.

I don't know what information you'll need in the way of logs (mostly because this is my first time using Solaris and VirtualBox and I don't know where programs keep things), but I can give you:

VirtualBox version: 4.1.16 r78094
Solaris version: Oracle Solaris 11 11/11

VirtualBox VM specs:
OS: Win7 64-bit (ideally, if it installs)
Memory: 11264MB
CPU: 1, 100% execution cap
CPU acceleration: VT-x/AMD-v, nested paging disabled
Video: 24MB memory, 1 display, no 3D acceleration, no remote server
Storage: 25GB dynamic VMDK stored on zpool, BD drive with passthrough
Audio: disabled
Network: 1 port enabled, NAT
Serial, USB, Shared Folders all disabled/defaults

Host specs:
Motherboard: Intel DX79SI
CPU: Intel Core i7-3820
Memory: G.SKILL Ares Series 16GB
Boot drive: OCZ Vertex 3 VTX3-25SAT3-60G
Data drive: 5.54TB zpool with 6 hard drives using raidz2 (drives of various sizes including 1TB, 1.5TB, and 2TB)
RAID card: SIL-3114 raid controller. I had to flash this card with an IDE-only firmware to get Solaris to pick up my drives, then in the format utility I had to specify the numbers so I could use the drive. There are 2 drives connected to this, the other 6 SATA devices (5 hard drives, optical drive) are connected directly to the motherboard)
Optical drive: LG BluRay burner

I tried to use Xen but found that there wasn't an immediate way to compile it for Solaris, so I came over to VirtualBox which installed super easy, but has since not worked at all. I found some posts which suggested there was a problem with nested paging, so I disabled that. I also had an error in VirtualBox one time after first starting it about not being able to access the optical drive in passthrough. I've since tried to run VirtualBox as root. I did run once before as my user account with passthrough disabled but the speed was the same.

So I'd love to provide more information if anybody is able to help me diagnose and resolve this issue. I'd really like to keep using Solaris/VirtualBox and I'm certain there has to be a solution to this!

Thanks,
Jared
jared.harder
 
Posts: 4
Joined: 19. Jun 2012, 03:39

Re: VM is unbearably slow

Postby martyscholes » 19. Jun 2012, 15:45

Just to rule out DVD issues, have you tried to rip the DVD to an ISO file and install against that?

I have many Windows / Linux instances running at any moment in time on a Solaris 11 server and they perform nicely. No one here has ever run VirtualBox as root. Then again, I have never attempted to use the host DVD drive either.
martyscholes
 
Posts: 202
Joined: 11. Sep 2011, 00:24
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Win 7, Ubuntu, Win XP, Vista, Win 8, Mint, Pear, Several Linux Virtual Appliances

Re: VM is unbearably slow

Postby Guyver » 19. Jun 2012, 16:07

How much ram does the host system have?
What kind of CPU (how many cores)?

I run several, though I admit I have nested pages enabled on mine.

I run with cpu cap set at 100%. I enabled the vt-x/amd-v. I set video memory to 128MB, and enabled 3D.

Memory set to 3GB.

# CPUs set to 2 (out of 4 - 2 cores, 2 threads)

Works like a champ, fast install.

Core i7 mobile - 2 core 2.66Ghz
8GB Ram - Lenovo T510 Laptop
Seagate 500gb FDE drive - fully encrypted
Last edited by Guyver on 19. Jun 2012, 20:16, edited 1 time in total.
Guyver
 
Posts: 103
Joined: 11. Feb 2012, 06:19
Location: Central United States
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Windows 7

Re: VM is unbearably slow

Postby michaln » 19. Jun 2012, 16:44

There may be something about some recent Intel CPUs that the current VirtualBox versions are allergic to. That is at this point pure speculation. So far users have been very good at not providing any solid data (sorry, "unbearably slow" doesn't count).

For example, is the slowness specific to certain CPU models? Is it specific to VT-x? Certain guest operating systems? 64-bit vs. 32-bit guests? Does it depend on the host OS? We don't know, and because we haven't seen the problem, we can't find out.

Note that if you are reasonably convinced that this is a VirtualBox bug (and the available evidence certainly points that way), you should create a ticket on the bug tracker; that way it's much easier to collect the necessary information. See https://www.virtualbox.org/wiki/Bugtracker
michaln
Oracle Corporation
 
Posts: 2962
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: VM is unbearably slow

Postby jared.harder » 20. Jun 2012, 04:09

martyscholes wrote:Just to rule out DVD issues, have you tried to rip the DVD to an ISO file and install against that?

I have many Windows / Linux instances running at any moment in time on a Solaris 11 server and they perform nicely. No one here has ever run VirtualBox as root. Then again, I have never attempted to use the host DVD drive either.


While I agree with you in principle, I doubt it's a DVD issue, because it takes a good 20 minutes for the VirtualBox splash screen ("press F12...") to make its debut and go away again.



Guyver wrote:How much ram does the host system have?
What kind of CPU (how many cores)?
I run several, though I admit I have nested pages enabled on mine.
I run with cpu cap set at 100%. I enabled the vt-x/amd-v. I set video memory to 128MB, and enabled 3D.
Memory set to 3GB.
# CPUs set to 2 (out of 4 - 2 cores, 2 threads)
Works like a champ, fast install.


RAM: G.SKILL Ares Series 16GB DDR3
CPU: Intel Core i7-3820, quad core. Full specs in the link: http://ark.intel.com/products/63698

I've created a new ticket at https://www.virtualbox.org/ticket/10684 and I'll see where that takes me.

Thanks!
jared.harder
 
Posts: 4
Joined: 19. Jun 2012, 03:39

Re: VM is unbearably slow

Postby Guyver » 21. Jun 2012, 15:47

Can I assume that you've tried setting the VM's video memory up to 128MB?
Guyver
 
Posts: 103
Joined: 11. Feb 2012, 06:19
Location: Central United States
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Windows 7

Re: VM is unbearably slow

Postby susu.exp » 21. Jun 2012, 18:33

VirtualBox VM specs:
OS: Win7 64-bit (ideally, if it installs)
Memory: 11264MB
CPU: 1, 100% execution cap


You're trying to run a 64-bit OS on 1 core with ~10 gigs of RAM? :|


...this is my first time using Solaris and VirtualBox...

I was once you. I've since found that Solaris and VBox go together almost as well as tomatoes and basil...

Key things about Solaris locations: 1. The /export/home/ thing. 2. Solaris likes /opt/ for "optional" things like VirtualBox and SFW Firefox.


To VBox:

Suggestions:
1. Make sure your I7 CPU's excellent virtualization options are fully enabled in host BIOS. If possible, enable "Plug and Play Operating System" in BIOS as well. Solaris is loaded with drivers and very capable of selecting optimal hardware settings for itself, although it may slow the boot slightly.

2. Give your guest a reasonable "hardware" configuration, one that would work well on bare metal. 64-bit guest OSs generally need at least 2 cores and a couple gigs of RAM to run well. For W7, I start with 128MB of video RAM, PAE, nested paging, hwvirtex, hpet.

3. Learn U some Solaris terminal for great justice. Solaris is beastly powerful, even compared to Linux.
"Find" and "apropos" commands are sometimes a lot of help. "man [command]" works better in Solaris than any other OS I've used. Have you worked with a BASH shell before Solaris?

Chapter 8 in the VBox manual + Solaris terminal can tweak your W7 VM so it runs surprisingly like bare metal in all but the most graphics card-intensive applications.
First command: VBoxManage showvminfo 'your guest vm name' - will list your current vm configuration. You can change every value with VBox terminal commands in the Solaris terminal, only some with the VBox GUI from a desktop.

C/P the output and attach here if you'd like, after you try 1. and 2., which should net you some big improvements.

Cheers!
susu.exp
 
Posts: 28
Joined: 15. Feb 2012, 09:01

Re: VM is unbearably slow

Postby jared.harder » 21. Jun 2012, 18:41

susu.exp wrote:
VirtualBox VM specs:
OS: Win7 64-bit (ideally, if it installs)
Memory: 11264MB
CPU: 1, 100% execution cap


You're trying to run a 64-bit OS on 1 core with ~10 gigs of RAM? :|


To be fair, I'm only posting the most recent iteration of VM config. I turned down the number of cores and video memory because I wanted to see how it would perform with minimal settings. I'm fully planning on increasing the number of cores once I can resolve the slowness issue.

To answer your other questions, I have had Linux as my core OS for 8 years now (Gentoo, Debian, Kubuntu, and now OpenSuse), but that hasn't quite prepared me for Solaris ;)

I'll double check all my settings on the CPU, but I'm pretty sure everything appropriate has been enabled. I'll let you know what I find out though.
jared.harder
 
Posts: 4
Joined: 19. Jun 2012, 03:39

Re: VM is unbearably slow

Postby susu.exp » 21. Jun 2012, 19:44

jared.harder wrote:
susu.exp wrote:
VirtualBox VM specs:
OS: Win7 64-bit (ideally, if it installs)
Memory: 11264MB
CPU: 1, 100% execution cap


You're trying to run a 64-bit OS on 1 core with ~10 gigs of RAM? :|


To be fair, I'm only posting the most recent iteration of VM config. I turned down the number of cores and video memory because I wanted to see how it would perform with minimal settings. I'm fully planning on increasing the number of cores once I can resolve the slowness issue.


You'll never resolve slowness by denying the OS what it needs to run. A 64-bit guest OS needs at least 2 processor cores to function properly. Your I7 Solaris host has 4. Since one must always leave at least 1 core unassigned for the host, you have 2 options with your W7 guest: 2 cores or 3. Start with 2.



To answer your other questions, I have had Linux as my core OS for 8 years now (Gentoo, Debian, Kubuntu, and now OpenSuse), but that hasn't quite prepared me for Solaris ;)

I'll double check all my settings on the CPU, but I'm pretty sure everything appropriate has been enabled. I'll let you know what I find out though.


After you make sure the Sandy Bridge's virtualization capabilities are enabled in BIOS, you can go on to make some of the suggested changes to your VM config - another core, 4GB RAM, 128MB of video RAM, PAE, nested paging, hwvirtex, hpet, VTx. You can change/enable all those settings with 1 VBoxManage modifyvm command from CLI, or use separate VBoxManage modifyvm commands sequentially until you're comfortable with VBox's syntax.

let us know how it works
Last edited by susu.exp on 21. Jun 2012, 21:38, edited 1 time in total.
susu.exp
 
Posts: 28
Joined: 15. Feb 2012, 09:01

Re: VM is unbearably slow

Postby Guyver » 21. Jun 2012, 20:43

jared.harder wrote:
susu.exp wrote:
To answer your other questions, I have had Linux as my core OS for 8 years now (Gentoo, Debian, Kubuntu, and now OpenSuse), but that hasn't quite prepared me for Solaris ;)


Once the kinks are worked out here, I think you'll enjoy your stay, I know I have for the past 12+ years.
Guyver
 
Posts: 103
Joined: 11. Feb 2012, 06:19
Location: Central United States
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Windows 7

Re: VM is unbearably slow

Postby jared.harder » 21. Jun 2012, 22:04

susu.exp wrote:You'll never resolve slowness by denying the OS what it needs to run. A 64-bit guest OS needs at least 2 processor cores to function properly. Your I7 Solaris host has 4. Since one must always leave at least 1 core unassigned for the host, you have 2 options with your W7 guest: 2 cores or 3. Start with 2.


I guess what I'm getting at is, at the time the VM is first starting up, there is no OS. It takes 20 minutes to get through the "BIOS" of the VM. It takes another 8 hours to boot from the DVD. I did have 2, 3 and 4 cores configured previously and it was still just as slow. Unless there _is_ a possibility that a blank VM has a requirement on the number of cores, which I can't see happening.

The other thing here is I use Microsoft Hyper-V at work, and I regularly configure 64-bit VMs with a single core and 2GB memory. They all run without issue. Of course Hyper-V and VBox are different things, but I'm just saying that 64-bit VM's don't necessarily need multiple cores.

For the time being, until frank updates the ticket, I'm going to leave that VM alone and not reconfigure it, so that way I can give him results that are consistent with my current setup.
jared.harder
 
Posts: 4
Joined: 19. Jun 2012, 03:39

Re: VM is unbearably slow

Postby michaln » 2. Jul 2012, 13:15

jared.harder wrote:The other thing here is I use Microsoft Hyper-V at work, and I regularly configure 64-bit VMs with a single core and 2GB memory. They all run without issue. Of course Hyper-V and VBox are different things, but I'm just saying that 64-bit VM's don't necessarily need multiple cores.

Correct. There is no requirement for multiple cores, and adding cores to VMs in general may or may not help (very specific to host/guest/workload combination).
michaln
Oracle Corporation
 
Posts: 2962
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: VM is unbearably slow

Postby susu.exp » 3. Jul 2012, 05:57

michaln wrote:
jared.harder wrote:The other thing here is I use Microsoft Hyper-V at work, and I regularly configure 64-bit VMs with a single core and 2GB memory. They all run without issue. Of course Hyper-V and VBox are different things, but I'm just saying that 64-bit VM's don't necessarily need multiple cores.

Correct. There is no requirement for multiple cores, and adding cores to VMs in general may or may not help (very specific to host/guest/workload combination).


It's entirely guest application dependent? "Core" in VBox can be thought of as "A group of threads exposed"?

I guess this is a good way to learn that... :lol:
susu.exp
 
Posts: 28
Joined: 15. Feb 2012, 09:01

Re: VM is unbearably slow

Postby Ramshankar » 3. Jul 2012, 06:58

susu.exp wrote:
michaln wrote:
jared.harder wrote:The other thing here is I use Microsoft Hyper-V at work, and I regularly configure 64-bit VMs with a single core and 2GB memory. They all run without issue. Of course Hyper-V and VBox are different things, but I'm just saying that 64-bit VM's don't necessarily need multiple cores.

Correct. There is no requirement for multiple cores, and adding cores to VMs in general may or may not help (very specific to host/guest/workload combination).


It's entirely guest application dependent? "Core" in VBox can be thought of as "A group of threads exposed"?

I guess this is a good way to learn that... :lol:


A VCPU runs in its own thread on the host, multiple VCPUs per VM means several VCPU threads on the host. VirtualBox doesn't pin down VCPU threads to host CPU cores and thus they are subject to the host scheduler. Yes, certain guest applications can behave differently when running with SMP but that usually also applies when they run on the host too but the effect might be amplified more (e.g. "iperf"). Adding more VCPUs to a VM is not a guarantee for better performance.
Oracle Corp.
Ramshankar
Oracle Corporation
 
Posts: 780
Joined: 7. Jan 2008, 16:17

Re: VM is unbearably slow

Postby susu.exp » 5. Jul 2012, 21:50

Ramshankar wrote:
susu.exp wrote:
michaln wrote: [to jared.harder]
Correct. There is no requirement for multiple cores, and adding cores to VMs in general may or may not help (very specific to host/guest/workload combination).


It's entirely guest application dependent? "Core" in VBox can be thought of as "A group of threads exposed"?

I guess this is a good way to learn that... :lol:


A VCPU runs in its own thread on the host, multiple VCPUs per VM means several VCPU threads on the host. VirtualBox doesn't pin down VCPU threads to host CPU cores and thus they are subject to the host scheduler. Yes, certain guest applications can behave differently when running with SMP but that usually also applies when they run on the host too but the effect might be amplified more (e.g. "iperf"). Adding more VCPUs to a VM is not a guarantee for better performance.



Thanks for the clarifications. 8)
It seems like I could run more guests if I reread Chapter 10... :D

Is it also possible to use priocntl to manually adjust Solaris' scheduling so that one can run more concurrent guests/instance, or more instances in separate zones? IOW, "optimize" or "tweak" Solaris or a Zone for VBox? Would it be worth the time to consider on Solaris 11, which is arguably the optimal VBox platform already? :mrgreen:
susu.exp
 
Posts: 28
Joined: 15. Feb 2012, 09:01

Next

Return to VirtualBox on Solaris Hosts

Who is online

Users browsing this forum: No registered users and 3 guests