scsi vs ide controller performance for linux under hyper-v

Just a quick conclusion on a question some of you might also have when creating disks for linux in a hyper-v virtualized environment.

This is particularly useful if you are still using hyper-v on windows server 2012 r2, instead of the newer Windows Server 2016, which i believe corrects this issue.

When creating a linux machine under hyper-v 2012 r2, first of all you must make sure to select a Generation 1 VM, otherwise it won’t boot, at least not with CentOS 7.

Unfortunately, this won’t allow you to boot from a virtual scsi drive, so your linux installation must reside on a virtual disk connected on a virtual IDE interface. Since there are different opinions on the web on whether this affects performance, here’s a simple but conclusive test.

After installing CentOS 7 on a virtual IDE controller, I added a separate virtual disk, from the same volume of the same storage, and I connected that disk as scsi this time. Since it’s not booting from it, it works just fine.

Here are the hdparm results.

First, /dev/sda which is the disk connected on IDE virtual interface:

# hdparm -tT /dev/sda
Timing cached reads: 22902 MB in 2.00 seconds = 11466.97 MB/sec
Timing buffered disk reads: 6928 MB in 3.00 seconds = 2309.02 MB/sec

And then the same on the disk connected on a SCSI virtual interface:
# hdparm -tT /dev/sdb
Timing cached reads: 22886 MB in 2.00 seconds = 11459.78 MB/sec
Timing buffered disk reads: 11148 MB in 3.00 seconds = 3715.91 MB/sec

You can see the buffered disk reads show a huge improvement, of more than 60%, between the scsi and the ide interface.

Hope this helps you all with your decision on disk configuration.

The obvious solution, if you have to stay on windows 2012 r2, is to keep the boot and maybe even root partitions on IDE, and map /var /home swap etc on partitions from disks connected as scsi.


Lucian Ruda

Lucian Ruda, student în ultimul an la Jurnalism şi Comunicare, pasionat de tehnică şi IT, de fotografie şi jocuri, de călătorii şi aventură. urmăresc să evoluez în obiectivitate, coerenţă şi corectitudine.

More Posts - Website

Leave a Reply

%d bloggers like this: