HDD vs SSD Speed

Discussions related to using VirtualBox on Windows hosts.
Post Reply
PMathies
Posts: 1
Joined: 14. Oct 2018, 20:50

HDD vs SSD Speed

Post by PMathies »

I wanted to understand the performance gain to a virtual machine when going from a HDD to a SSD on the host machine. I performed the following steps, once using a physical 7200rpm HDD (SATA III) and a second time using a SSD (SATA III). All other hardware is identical (just physically swapped the drives).

1) Fresh install of Windows 10, Virtual Box.
2) Used the SATA controller in Virtual Box (Settings -> Storage -> Controller (SATA)). With my SSD I checked the "Solid-state Drive" checkbox under Attributes.
3) Started a CentOS VM, ran "hdparm -t /dev/sda2" and "hdparm -T /dev/sda2".

Output:
HDD:
Buffered Disk Reads = 146 MB/sec
Cached Reads = 9585 MB/sec

SSD:
Buffered Disk Reads = 175 MB/sec
Cached Reads = 10504 MB/sec

I'm puzzle because the performance gain is not what I expected. Running CrystalDiskMark on the Windows host shows the SSD performs at least 5X faster when reading.

Could anyone help me understand why the speeds are as they are? Is there a setting I've missed somewhere in VirtualBox? Does it have something to do with emulating the controller / drive?
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: HDD vs SSD Speed

Post by andyp73 »

PMathies wrote:Does it have something to do with emulating the controller / drive?
Yes, the disk controller within VirtualBox is emulated. As far as the host operating system is concerned it is just one more application requesting disk reads and writes. Obviously, with a faster disk in the host it can services these requests more quickly so you get some performance benefit in the guest but I doubt you will see the full performance benefit.

-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.
Rootman
Posts: 251
Joined: 1. Oct 2012, 18:29

Re: HDD vs SSD Speed

Post by Rootman »

I can't comment on the test results, andyp73 has that covered.

All I can comment on is that when I swapped out an HDD to an SSD on my hosts I saw a noticeable and remarkable performance increase in my VMs.

They launch and respond much faster. In one laptop host case they went from barely usable to quite usable. On an engineering desktop they went from sluggish to very responsive.

I would disregard the test results and just see what they feel like now.
Post Reply