CPU performance on Solaris guest

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
bautsche
Posts: 5
Joined: 10. Oct 2011, 09:53
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: Solaris

CPU performance on Solaris guest

Post by bautsche »

Hi.

I have a CPU performance issue.

Tried to do various google lookups and failed to find anything relevant. If I missed where to look, please point me there.

I have a Solaris 10 U10 physical host which is running VirtualBox 4.1.2
On it I am running a SuSE host and a Solaris host (a development build of Solaris 11).
The physical host has 16GB of memory, the Solaris virtual host 8GB, SuSE 1 GB.
The physical host has 4 cores, the Solaris virtual host has 4 CPUs, SuSE 1 CPU.

The load average on the virtual host regularly goes beyond 5 while on the physical host it stays below 2. Here's what it looks like right now:
physical host: 9:00am up 2 day(s), 22:51, 2 users, load average: 1.64, 1.69, 1.75
virtual host: 9:00am up 2 day(s), 22:37, 2 users, load average: 2.18, 2.22, 2.30

Some of the worst cases I've seen show physical host load average under 2 and virtual host load average as high as 15.

Clearly, I could simply stop processing in the virtual host. At the times that I see the high load, there are lots of things going on on the virtual host, but the concern I have is that the virtual host does not appear to be using all the resources available to it.

Am I missing a basic concept? Is there some settings I should change?

Any help and pointers greatly appreciated.

Thanks.
Eric
ljw1
Posts: 41
Joined: 26. Apr 2009, 10:35
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: Ubuntu

Re: CPU performance on Solaris guest

Post by ljw1 »

The first question is why are you assigning more cores than you actually have?
In my limited use I always keep the assigned cores below the number of actual cores. I have also noticed that one physical core is kept for the hypervisor, which is your case would leave 3 cores available to share the thread across. You might find that one of the physical cores is being assigned to the other vm which would knock it down to 2 physical cores for your 4 virtual cores. Have a try with reducing the number of cores and see.
Good luck
bautsche
Posts: 5
Joined: 10. Oct 2011, 09:53
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: Solaris

Re: CPU performance on Solaris guest

Post by bautsche »

Wouldn't you expect the load in the physical host to be high and in the virtual one to be low if there was contention?
I originally just had a single CPU assigned to the Solaris Guest and load averages were abysmal then, this is why I upped it.
I can set it to two which if I understand your argument is the maximum I can set it to, however, how do the various processes get pinned to a CPU and is that in fact something I should do, i.e. in processes to CPUs?
I had expected more than one process to be started by Virtual Box when I upped the CPU count for the guest, which didn't happen. So how would I pin a single process to two CPUs?
Sorry to be a pain and thanks for the help.
Eric
ljw1
Posts: 41
Joined: 26. Apr 2009, 10:35
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: Ubuntu

Re: CPU performance on Solaris guest

Post by ljw1 »

In my limited experience there is always one cpu devoted to the management of the guests, which was observed by looking the the cpu usage of the host. The cpu monitor shows the 3 cpus attached to the vms at 100% with the last cpu at about 30%. What sort of cpu are you using? Virtualbox box on my mac (Intel I7) uses each of the hyperthread as cpu as far as I can tell, maybe that is what you are seeing. On my solaris server there is no hyperthreading so the vms make full use of whatever cpu are assigned to them. Not sure where to go from here, and I was hoping someone with more experience would have commented by now.
bautsche
Posts: 5
Joined: 10. Oct 2011, 09:53
Primary OS: Solaris
VBox Version: OSE other
Guest OSses: Solaris

Re: CPU performance on Solaris guest

Post by bautsche »

I finally got a chance to shut the guest down today and change the CPU count on it. It's now running at 2 CPUs and perversely enough, that seems to have resolved the load issue (so far at least).
Looking at the number of processes, there still is only one process per guest and even the number of LWPs does not seem to correspond to the number of CPUs allocated:
bautsche@bianca $ ps -f -u vboxuser -o user,pid,nlwp,args
USER PID NLWP COMMAND
vboxuser 12438 1 /opt/VirtualBox/amd64/VBoxXPCOMIPCD
vboxuser 12411 77 /opt/VirtualBox/VBoxHeadless --startvm SuSE
vboxuser 12440 11 /opt/VirtualBox/amd64/VBoxSVC --auto-shutdown
vboxuser 19638 63 /opt/VirtualBox/VBoxHeadless --startvm titania2

SuSE has 1 CPU, titania2 has two.

VirtualBox on its own also doesn't bind processes or LWPs to CPUs.

I'm still puzzled as to how VirtualBox organises this internally....
Any pointers that might help my understanding greatly appreciated.

Eric
Post Reply