Allow limiting IO operation size (KVM)
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 19時間
- マージ済み PR(30日)
- 32
説明
##### 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
コントリビューションガイド
調査の方向性
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java の 1173-1207 行付近から始めます。そこには KVM IO オプションが定義されていると issue に記載されています。リンクされている QEMU のスロットリングに関するドキュメントと、libvirt の size_iops_sec のリファレンスを読み、その後、CloudStack の KVM 設定でこのオプションを利用できるようにし、生成された設定がアカウンティングに要求された IO サイズを使用することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- cloud, infrastructure
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 62/100