Comments (6)
使用的 Alibaba Cloud Linux 3 吗?实现跟 Alibaba Cloud Linux 2 是一样的。
确认下是否已经在启动参数中打开了 cgwb_v1,按照文档检查下具体那一步不符合预期。
from cloud-kernel.
是使用release-5.10分支源码编译的内核,确认启动参数cgwb_v1打开。
memcg和blkcg映射关系:
# cat /sys/kernel/debug/bdi/bdi_wb_link memory <---> blkio memcg1: 4470 <---> blkcg1: 1819
iostat测试结果不符合预期,测试4.19分支是符合预期的。所以不清楚5.10内核是否需要其他配置?
from cloud-kernel.
hi,我使用 Alibaba Cloud Linux 3 的内核(5.10.84-10.3.al8.x86_64),测试是正常的。我的步骤如下:
1)在启动参数中增加 cgwb_v1,重启;
2)执行测试脚本(以 vdb 盘为例,主次设备号为 253:16,挂载目录为 /mnt/vdb):
cgcreate -g blkio:blkcg1
cgcreate -g memory:memcg1
echo 253:16 10485760 > /sys/fs/cgroup/blkio/blkcg1/blkio.throttle.write_bps_device
cgexec -g blkio:blkcg1 -g memory:memcg1 fio -name=test -filename=/mnt/vdb/testfile -iodepth=32 -thread -rw=randwrite -ioengine=libaio -direct=0 -bs=4k -size=1G -numjobs=1
3)查看 iostat -xdm 1 vdb,会发现缓存回刷开始后基本维持在 10MB/s。
from cloud-kernel.
按照您的方法使用fio测试结果符合预期,感谢大佬解惑
from cloud-kernel.
如果你说的不符合预期是指 iostat 观测到的值不是那么准确,那应该是跟顺序 io 的合并有关系。
因为内部是通过时间片来计算的,举个例子,在某一秒最后一个时间片之前已经下发 9MB 了,而接下来的 io 是 2MB 的大小,这种情况下就不是每秒显示的数据都是稳定在 10MB,但从一个时间跨度来看,平均下来的数据还是比较准确的。
from cloud-kernel.
是这样,按照那个文档使用dd+iostat进行测试时,按照如下操作:
配置内核启动参数 cgwb_v1,重启;
mkdir /sys/fs/cgroup/blkio/blkcg1
mkdir /sys/fs/cgroup/memory/memcg1
bash -c "echo $$ > /sys/fs/cgroup/blkio/blkcg1/cgroup.procs"
bash -c "echo $$ > /sys/fs/cgroup/memory/memcg1/cgroup.procs"
echo 8:0 10485760 > /sys/fs/cgroup/blkio/blkcg1/blkio.throttle.write_bps_device
dd if=/dev/zero of=/data/test bs=4k count=10000
iostat -xdm 1 sda查看结果如下:
Device r/s w/s rMB/s wMB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Device r/s w/s rMB/s wMB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
sda 4.00 11.00 0.02 7.43 0.00 0.00 0.00 0.00 0.00 2.36 0.03 4.00 692.00 2.40 3.60
Device r/s w/s rMB/s wMB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Device r/s w/s rMB/s wMB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Device r/s w/s rMB/s wMB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util
sda 0.00 20.00 0.00 24.57 0.00 0.00 0.00 0.00 0.00 18.90 0.38 0.00 1258.00 5.20 10.40
from cloud-kernel.
Related Issues (20)
- [SoC2020] Support upgrading the existing D-Bus daemon without reboot HOT 7
- snap doesn't meet dependency requirements HOT 3
- docker-ce doesn't meet dependency requirements HOT 4
- Missing a Dingtalk Group for Ali linux . HOT 2
- `CONFIG_CROSS_MEMORY_ATTACH` is not set in the kubernetes engine HOT 2
- I want information
- Alibaba Cloud Linux release 3无wireguard模块么? HOT 8
- Missing yum-plugin-releasever-adapter in Alinux 3 alinux3-plus repo HOT 2
- tcp 传输小包返回结果有40ms延迟,跟内核tcp设计有关? HOT 1
- cloud-kernel is cgroup V2 already supported?
- A question about systemd-nspawn
- 怎么为特定版本内核生成btf文件? HOT 1
- 重新下载安装yum rpm包,从哪里下载,下载什么版本的?
- 能否将intel i225的igc驱动移植到4.19的内核中 HOT 1
- AliyunLinux2 创建快照/镜像 后产生无用的 aliyun-base.repo 引起报错 HOT 1
- The return value of 'sscanf()' should be checked
- Document /proc/sys/net/ipv4/tcp_tw_timeout interface HOT 1
- 2020 Alibaba Summer of Code HOT 4
- [SoC2020] PostgreSQL: add io_uring support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-kernel.