Thursday, October 31, 2019

Virtualization to outperform Bare Metal performance? Simulating a RAM Cache, RAID Controller in a Desktop System

In general you could get a near native performance on Qemu-KVM following the instructions, specified in this article. 

Now what if you could get performance levels that can outperform the host system?

In Qemu-KVM, there are options to enable the same, which will provide you performance, more than the Bare Metal system, by the use of aggressive caching.

Note: This inherently has the risk of data loss, in case of a host failure or crash, hence not recommended for production workloads.

This tweaks can be applied to a POC/Development VM, by which you can complete your tasks much faster than before. To overcome data loss/OS corruption, its always recommended that you snapshot your Virtual disks before enabling this mode. So in case of any issues, you could revert back to your previous working image.

Below are the performance level, we’ve achieved with/without the Virtual Disk performance options. We’ve seen 60-70% performance gain on an average, once the system is up and running.

Windows7 VM

Normal (Seconds)

With IO Tweaks (Seconds)

System Reboots

57

13

Opening Visual Studio 2013

8

3

System Shutdown

21

9

 

The tests are comleted on a Windows7 VM with the below configuration:

This would be a great option for development and Virtual machines for POCs, typical usecase under Desktops/Laptops. The settings are related to IO mode on the virtual disks, and which extensively use caching, and most of the writes to disk, will be kept in cache, until there is sufficient data. Once it has, it will write them to disk in one go. This is “Analogous to RAID controller with RAM cache”, and KVM brings this feature to a normal desktop/laptop without any major efforts

 


During the initial startup, performance levels remain at par, however the performance will steadily move up, once you’ve the system up and running and more data has been cached in host overtime.

This level of performance may not be achievable from a Windows Desktop (Running on Bare Metal), as it would periodically synchronize IO with the underlying disks, which will hinder the performance for high data reliability.

You could get additional preformance boost, if you use the “raw” storage format, instead of “qcow2”

To know more, read through the below posts:

QEMU Disk IO performance comparison: Native or threads?

VIRTUALIZATION TUNING AND OPTIMIZATION GUIDE

Virtual IO CACHING

How to improve Windows perfomance when running inside KVM

What is the memory module on a RAID card needed for?

1 comment:

  1. hey thanks for sharing. if you're looking for a reliable vps provider in asia then check out casbay .

    ReplyDelete