VM IOPS check for OpenVZ and KVM

jinjer

Renowned Member
Oct 4, 2010
204
7
83
This might be a FAQ, but I can't find the answer.

Is there a way to check IOPS (not just disk bytes read/written) from an OpenVZ container (and kvm ... perhaps).

I need to limit iops from containers to a maximum value of say 50 iops and throttle "abusers" until they slow-down disk requests.

jinjer
 
I'm using "fio" benchmark for this


random read: (iops)
fio --filename=/dev/[device] --direct=1 --rw=randread --bs=4k --size=1G --iodepth=100 --runtime=120 --group_reporting --name=file1 --ioengine=libaio

random read: (iops)
fio --filename=/dev/[device] --direct=1 --rw=randwrite --bs=4k --size=1G --iodepth=100 --runtime=120 --group_reporting --name=file1 --ioengine=libaio



seq read: (bandwith)
fio --filename=/dev/[device] --direct=1 --rw=read --bs=4M --size=1G --iodepth=100 --runtime=120 --group_reporting --name=file1 --ioengine=libaio

seq write: (bandwith)
fio --filename=/dev/[device] --direct=1 --rw=write --bs=4M --size=1G --iodepth=100 --runtime=120 --group_reporting --name=file1 --ioengine=libaio
 
Sorry, I might have not expressed myself clearly.

What I need is to measure the iops used from an openvz container from the "host" so that I can block abusers and/or limit them to a certain io.

In openvz there's a way to prioritize io for containers on 8 different levels using the cbq scheduler on the block device holding the openvz roots, however there must be a way to know which containers to penalize and which ones to keep at a default level.

VMWare has a setting for iops on each virtual machine.

KVM could use some tweaks but its probably possible to get iops on the containing lvm/dm device.

There are graphs in proxmox for openvz container disk activity, but it shows disk read/write in bytes. Perhaps there's a way to hack an iops metric too?
 
  • Like
Reactions: postcd

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!