[OpenIndiana-discuss] Slow performance of guests in virtualboxon OI?

Jim Klimov jimklimov at cos.ru
Tue Dec 4 16:42:09 UTC 2012


On 2012-12-04 15:02, Dan Swartzendruber wrote:
> Thanks for the suggestions!  #1 and #2 are new to me - I came from ESXi,
> where you just set the VMs up and the bridging works automatically.  I had
> read old articles for vbox about having to do this by hand, but the new
> version seemed to 'just work', so it didn't occur to me there might be
> issues there.

Well, in my experience, bridging over "native" interfaces (like
e1000g0) is the only way it works in Solaris 10, since there are
no VNICs, and I don't remember networking issues on that platform.

On OpenSolaris-derivates (SXCE, OI) however I've often hit the
problem that if I used bridging over native interfaces, or - worse
perhaps - used VNICs whose MAC addresses mismatched those in VM,
then external networking usually worked (no idea on performance),
but guest-host was either missing or intermittent.

One explanation I've heard was that by default the engine has to
filter packets from promiscuous mode on the wire, adding to latency
and probably breaking the guest-host comms. With the VNICs, this
stuff is done by host kernel rather than userspace software, or even
by hardware - if it supports binding to several MACs simultaneously.

In short, defining static MACs for your VNICs and using those in
VirtualBox VM definitions (or, now, redefining the VNICs to have
the MACs that VMs generated for themselves) - I believe this should
help or solve your issues. At least, this is often the first and
last step in such troubleshooting :)

HTH,
//Jim

> No idea on #3.  #4 yes, I did install the extension pack and
> guest additions for everyone.  #5 nothing in logs.  I'm pretty sure there is
> no memory pressue on the guests - neither one is using more than 1GB of the
> 2GB assigned when this happens.  It's frustrating, because it is not
> horribly slow, just noticeably laggier than under ESXi.
>
> -----Original Message-----
> From: Jim Klimov [mailto:jimklimov at cos.ru]
> Sent: Tuesday, December 04, 2012 7:01 AM
> To: Discussion list for OpenIndiana
> Subject: Re: [OpenIndiana-discuss] Slow performance of guests in
> virtualboxon OI?
>
> Hi,
>
>     I don't think I've had substantial lags in VBoxes, but it may be a lucky
> case of hardware - and that's not only the different layers of
> virtualization support in CPUs. In particular, recent list mails suggested
> that server-grade NICs with buffers and networking-task offload features
> might implement things like CrossBow VNICs with their unique MAC addresses
> in hardware rather than with CPU emularion and brute promiscuous mode.
> Likewise, I believe it might be possible to find such hardware that would
> lag due to HW or (lack of) drivers in illumos, and you might have had bad
> luck with that on a particular motherboard.
> Thus, you might have better luck with separate NICs, usually those with
> e1000g driver pose almost no problems (during OS upgrades, they forget the
> Jumbo settings, if those were used, due to overwriting of
> /kernel/drv/e1000g.conf).
>
>     To verify that you hit VBox-intrinsic problems rather than something
> else, can you:
>
> 1) Set up an etherstub on the host and attach VM VNICs to that?
> This should rule out any hardware from your networking between VMs and host,
> leaving the VM engine performance and limitations.
> If this does work for you better than equivalent setup on hardware, you can
> organize routing/NAT via the host GZ or a dedicated LZ with exclusive IP
> stack attached to this etherstub.
>
> 2) You did set up the MAC addressing for bridged VM interfaces properly,
> right? (You have a dedicated host VNIC per VM NIC, and the unique MAC
> addresses of the two are equal) I did not really work with non-bridged
> interfaces (VBox NAT, VBox host-only), so can't comment on performance of
> those.
>
> 3) Recent VBox might add some optimizations like "memory balooning" and
> memory deduplication. I wonder if these happen to you, and if they are
> troublemakers or not...
>
> 4) Do you use the proprietary extension pack above the GPL VBox software,
> and do you add guest additions to your VM's OSes?
> Usually, these should help speed up your VM experiences.
>
> 5) Look in VBox logs (stored under VMs' folders), to see if the engine
> complains about anything unusual that it can't initialize or use, etc.
>
> 6) Scroll over VirtualBox under Solaris forum, perhaps ask some questions
> there too :)
>
> On another hand, I don't think I've stressed my systems that much.
> Basically, for an interactive VM I've only used my laptop in the past few
> months, and when there were tests with a dualbooted Win7 (on its dedicated
> partition where it could native-boot from too) performance felt acceptable.
> It did take slower to boot and halt, that with a native boot, but after I
> added RAM (and about 3Gb of the 8Gb available got dedicated to the Windows
> VM), performance during work (word processing, browsing) was not really
> discernible from that with a native boot with 4GB HW RAM before. Windows is
> memory-greedy however, so anything around 2GB lagged even on HW native boots
> for Win7 and Vista.
>
> For virtualization purposes, you might also need to provision much swap
> space (at least as much as your VMs are configured to use as their vRAM),
> and disk performance/cache for the backing stores might matter - though you
> do say that is blazing fast.




More information about the OpenIndiana-discuss mailing list