apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.98k stars 1.09k forks source link

Allow limiting IO operation size (KVM) #8384

Open salfers opened 9 months ago

salfers commented 9 months ago
ISSUE TYPE
COMPONENT NAME
KVM hypervisor
CLOUDSTACK VERSION
4.18 or latest
SUMMARY

The qemu documentation explains why this is important:

When applying IOPS limits all I/O operations are treated equally regardless of their size. This means that the user can take advantage of this in order to circumvent the limits and submit one huge I/O request instead of several smaller ones.

QEMU provides a setting called throttling.iops-size to prevent this from happening. This setting specifies the size (in bytes) of an I/O request for accounting purposes. Larger requests will be counted proportionally to this size.

In libvirt this option is called size_iops_sec inside the <iotune> section (ref).

Other big clouds such as AWS also use this mechanism to fairly allocate IOPS.

STEPS TO REPRODUCE

Checking the CloudStack code shows that this option is currently not supported: https://github.com/apache/cloudstack/blob/1411da1a22bc6aa26634f3038475e3d5fbbcd6bb/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java#L1173-L1207

isnuryusuf commented 8 months ago

Just wondering, did you manage Limit IOPS when you use Local Storage (as Primary storage) on KVM Hypervisor? i try different QOS Type Hypervisor and Storage both doesn't work

Storage type: Local QoS type: Hypervisor or Storage Disk read rate (IOPS): 1000 (Hypervisor type QOS ) Disk write rate (IOPS): 1000 (Hypervisor type QOS ) Min IOPS: 1000 (Storage type QOS ) Max IOPS: 1000 (Storage type QOS ) Provisioning type: Thin