Virtualbox much slower than VMware

Discussions related to using VirtualBox on Windows hosts.
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Virtualbox much slower than VMware

Post by Jimz »

I have an issue with Virtualbox performance. It is much slower than VMware on the same host. Geekbench 4 single thread CPU performance on Virtualbox is only 1809 but on VMware get impressive 3739. (See viewtopic.php?f=6&t=88678)

What is wrong with VirtualBox?
Attachments
VBoxLog.zip
(25 KiB) Downloaded 47 times
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

I have tried everything. I have reinstalled VirtualBox. I have completely removed VirtualBox and installed it again. I have reinstalled the guest VM. I have reinstalled VirtualBox Guest additions. I even reinstalled the Windows from scratch. I have updated the host bios. I have tried different guest operating systems (Linux and Windows). But no help. The guest VM on top on VirtualBox on Windows host is always much much slower than VMware, or on Linux host. I have to give up on VirtualBox and try to start to use VMware instead. :(
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox much slower than VMware

Post by mpack »

CPU Benchmarks run inside a VM are pretty meaningless. Consider how a virtual timer works.

AFAICS you have not installed the Guest Additions, hence graphics performance will be poor.

I see you are running the VM off of "drive F:", which is what exactly? If this is some crappy USB drive then you can expect poor disk performance.

Otherwise, as you would do in the physical world, look in the task list of the guest to see exactly what is eating CPU or disk bandwidth. It doesn't just magically disappear.
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

Hi,

If you read my original post (viewtopic.php?f=6&t=88678), I not complaining about graphics performance, nor am I complaining about disk performance. I really do not care about GFX performance. I do use mostly only terminal to do my work. I am telling you that the performance of the VM is very poor. And I have already isolated the issue to CPU performance. The "Drive F:" was a USB drive, you guessed correctly, but it was a USB3 SSD drive, so not exactly crappy. But the disk does not matter. I get very poor CPU performance even with local SATA SSD drive. I don't believe the Geenbench CPU benchmark has anything to do with disk driver performance.

And I do have Guest Additions installed. Why do you say I don't have?

I don't say that the performance has magically disappeared. I say there isn't any to begin with. The guest in this VM was not doing anything else during the Geekbench execution.
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

Interestingly, running VirtualBox inside VMware is faster than running VirtualBox directly only Windows host.

Geekbench single thread CPU benchmarks:
VMware: 3739
VirtualBox: 1809
VirtualBox inside VMware: 2887

Something must be very wrong with VirtualBox on Windows host in my case.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Virtualbox much slower than VMware

Post by Martin »

Are you really sure that Geekbench produces reliable/comparable results in a virtual machine?
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

At this point I cannot be sure of anything. But I can feel the difference. Everything is slower on VirtualBox.

To backup my feeling, I did some other tests:

Sysbench:
(sysbench cpu --num-threads=1 --cpu-max-prime=9999 run)
- VMware: 980 events per second
- VirtualBox: 610 events per second

Compression:
(time gzip < /usr/lib/locale/locale-archive > /dev/null)
- VMware: 11.168 seconds
- VirtualBox: 42.470 seconds !!!

Generating random numbers:
(time dd if=/dev/urandom of=/dev/null bs=1M count=2000)
- VMware: 9.573 seconds
- VirtualBox: 18.024 seconds

All results are averages of three different runs.
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

If you want to check the Geekbench results in more detail, here is one report for each:
VMware: https://browser.geekbench.com/v4/cpu/9081972
VirtualBox: https://browser.geekbench.com/v4/cpu/9084136
VirtualBox inside VMware: https://browser.geekbench.com/v4/cpu/9084004
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Virtualbox much slower than VMware

Post by andyp73 »

Jimz wrote:To backup my feeling, I did some other tests:
As has already been stated, those results are probably pretty meaningless!

For comparison (such as it is) I have a Fedora 27 guest (1 core with 1024MB RAM) running under VirtualBox on my 2017 iMac. Running your tests gives:
time dd if=/dev/urandom of=/dev/null bs=1M count=2000
real    0m9.809s

time gzip < /usr/lib/locale/locale-archive > /dev/null
real    0m6.199s
My guess would be that rather than this being an issue with VirtualBox per se there is some problem with your host that is causing this behaviour.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

Why would you say the numbers are meaningless???

Obviously you must not compare my numbers to yours!!! That is not going to make any sense, as the host is completely different.

But, in my case, it is the same physical host on both cases, same fedora 28 installed on both, and both have the same resources (CPU, memory, etc.). How else I am suppose to show you that is really is much much slower???

But I agree there is something wrong with VirtualBox in Windows _host_, because on the same PC, running VirtualBox on Linux gives me the same performance as VMware on Windows.

So again, as a summary (on the same physical PC):
VirtualBox on Linux host: great performance
VirtualBox on Windows host: crappy performance
VMware on Windows host: great performance
VirtualBox on VMware on Windows host: pretty good performance
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox much slower than VMware

Post by mpack »

Jimz wrote:Why would you say the numbers are meaningless???
You were told that in the first answer. Virtual (time shared) timers do not make for accurate benchmarking.
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

But I get similar results, if I use a separate stop watch!
Everything is just slower on VirtualBox (on Windows host).
Jimz
Posts: 24
Joined: 11. Jul 2018, 10:52

Re: Virtualbox much slower than VMware

Post by Jimz »

Actually, when I repeat the gzip and the random number tests, and measure the time also with a separate stop watch, I get always about 0.5 seconds longer time with a stop watch than what is reported by time command. And that is just because of my reaction time to stop the watch when the command exists.

So, as far as I can tell, you are simply wrong!
Accurate or not, it does not even to start to explain the performance difference.
So. I am sorry, but the numbers I posted are in fact showing pretty exact performance difference between VirtualBox and VMware.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Virtualbox much slower than VMware

Post by andyp73 »

Jimz wrote:So. I am sorry, but the numbers I posted are in fact showing pretty exact performance difference between VirtualBox and VMware.
You are blaming VirtualBox for an issue that almost certainly isn't of VirtualBox's making.

Running on a Windows host is by far and away the most common scenario and if there were a fundamental performance issue then there would be daily complaints on the forums and I suspect some very unhappy folks amongst Oracle's paying customers. As we don't see the former and the latter would cause a fix to be rolled out very quickly then I think it is fairly safe to assume there isn't.

You need to look closer to home and take a look at your host system to see what in your Windows host is causing you to see this behaviour.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
AnrDaemon
Posts: 134
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Linux, Windows

Re: Virtualbox much slower than VMware

Post by AnrDaemon »

Enable hardware virtualization support.
Post Reply