Possible to create a Virtual Machine in linux and specify IOPS?

I would like to create a few VMs with different max IOPS - e.g. 100, 200 and 500 - for various bench-marking tests.

I have tried VMWare Workstation Player for Linux but it does not have options to configure this. I have also tried to get a free trial of VMWare vSphere ESXi but so far no luck with that.

Are there any easy/simple free alternative for linux where I can create multiple VMs with a specified max IOPS?

Looks like its possible in Hyper-V for Windows: https://www.youtube.com/watch?v=qbWVFS4UyH0

but I need a Linux solution


I work for Google and don't want to make advertisement here, but it's naturally the cloud I am most familiar with. You can determine your VM's IOPS performance by choosing (a) the type of persistent disk and (b) its size. The bigger the size, the higher the IOPS will be as requests can be parallelized. Up to a certain threshold which will be determined by the VM type (a slow CPU can't deliver more than so much IOPS).

Reading https://cloud.google.com/compute/docs/disks/performance you can find (as of 2021-12-11) that if you choose a zonal standard PD, you can expect 0.75 IOPS per GB for read. So, if you have a 100GB disk, you can expect 75 IOPS (read). If you want more, go for SSD disks or increase the disk's size.

To answer your question - 100 IOPS (write) should be doable with a 67GB zonal standard PD disk. For 200, you need to double the size, for 500, you take it times five.

Before the cloud age, I wrapped my head around this topic and I really recommend the result based on your question, find it here: https://www.admin-magazine.com/Archive/2016/32/Fundamentals-of-I-O-benchmarking


If using libvirt/KVM, it should be possible. From the project docs:

read_iops_sec
Read I/O operations per second limit. Since 1.2.2

write_iops_sec
Write I/O operations per second limit. Since 1.2.2

These parameters can be set under the <blkiotune> section.