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 摘要。