Allow limiting IO operation size (KVM)
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 1.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 32
Description
##### ISSUE TYPE
* Improvement Request
##### COMPONENT NAME
~~~
KVM hypervisor
~~~
##### CLOUDSTACK VERSION
~~~
4.18 or latest
~~~
##### SUMMARY
The [qemu documentation](https://github.com/qemu/qemu/blob/master/docs/throttle.txt#L142) 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 `` section ([ref](https://libvirt.org/formatdomain.html)).
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
Contributor guide
Research direction
Start in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java around lines 1173-1207, where the issue says KVM IO options are defined. Read the linked QEMU throttling documentation and libvirt's size_iops_sec reference, then make the option available for CloudStack's KVM configuration and verify the generated setting uses the requested IO size for accounting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100