VirtualBox 5.2 slooow? Something I found


#1

I just tried Virtualbox 5.2 for the 3rd time and for the 3rd time I went back to 5.1.

This time, I found this bug almost exactly describes my problem with VirtualBox 5.2: https://www.virtualbox.org/ticket/17573

The culprit is a huge difference with Host I/O cache. Here’s my data doing a large update on an old 17.10 VM:

Version 5.2.12  HostI/O cache ON   51m46.641s
Version 5.2.14  HostI/O cache OFF  26m12.898s

Version 5.1.38  HostI/O cache ON    4m19.467s
Version 5.1.38  HostI/O cache OFF  26m 7.808s

You’ll notice the two versions are virtually identical with Host I/O cache OFF but egad look at the difference with it on!!!

I have a theory Host I/O cache in 5.2 fails to cache downloads like 5.1 did. The result is extreme “unpacking” times during upgrading which has a large penalty for missing cache.

I don’t want to generate an Oracle account just for this bug but welcome others to reference this post. I just hope it helps someone else.

Yeah, I know data corruption can occur with Host I/O cache with power failures and some resets of a VM but dang, the performance is worth it to me! :slight_smile:


#2

Hi Bill,
VB 5.2 didn’t works well for me in Xenial. For example, in inmutable vdi, the discs didn’t reset properly when shutdown, sometimes it seems that it was more like a reboot, also the process mount-unmount was inconsistent. And I had to use VB 5.1 again.
Which version of mate have you installed?
I’ve changed to Bionic and all is fine again in VB 5.2. I think (maybe) is a kernel compatibility problem.

Hope it helps you.


#3

Hi @Tim, For sure I’m on 16.04 and even did try the hwe-edge kernel in the standard repos but that only got me to 4.13. I have a test install of 18.04 on a 2nd drive I will try 5.2 on. But 18.04 hasn’t been good to me… at all… to even consider it yet.

Thanks much for the input!

EDIT1:
Running the exact same benchmark above on 5.2 and 18.04 but THIS takes awhile. Same VM same upgrade. So far I know it won’t be near the 5.1 performance. I’ll have a number soon.

EDIT2:
22m48.986s which is a lot better. Host I/O penalty is gone for sure. But no super advantage of Host I/O cache like 5.1 has.

Ubuntu_mate 18.04 (4.13.0-41 kernel)
Version 5.2.14  HostI/O cache ON   22m48.986s

#4

Similar issue as Virtualbox Sluggish? A Possible Quick Fix except different results.


#5

It is and isn’t a difference. 5.2 behaves similar to 5.1 for most aspects of Host I/O cache. A VM that previously booted up in 40 seconds will completely reboot in 10 seconds with Host I/O cache enabled. And this lasts for hours in my box with 24GB of memory.

I have seen the negative side of Host I/O caching, too. When closing a VM, write-behind prevents restarting it right away.


#6

More ideas:
In VB 5.2 have you checked if your host is swapping too much? Too much processes in background? Free enough ram space assigned to your guest is very important too. You can ckeck this (again if necessary, haha, sorry if it’s obvious):


Of course, I’ve take the idea you’ve updated guestadditions and ext. pack. in guest.


#7

For the record, the bug I originally posted was found AND FIXED in 5.2.20. This is on Xenial and the ridiculous times I originally posted are now gone.