apache / apache/cloudstack

Allow limiting IO operation size (KVM)

未關閉
#8,384 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
component:primary-storage component:storage type:new-feature
主要語言
Java
星號
3.1k
分支
1.4k
平均合併
6 天 19 小時
30 天內合併 PR
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 行附近開始,issue 中指出 KVM IO 選項就在此處定義。閱讀連結的 QEMU 限流文件和 libvirt 的 size_iops_sec 參考,然後讓該選項可用於 CloudStack 的 KVM 設定,並驗證產生的設定使用要求的 IO 大小進行計量。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
cloud, infrastructure
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
62/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。