Bug 22410 - Revert "udev: use bfq as the default scheduler"
Summary: Revert "udev: use bfq as the default scheduler"
Status: NEW
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: SIG Packages (show other bugs) SIG Packages
Version: 23.1
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: happy_orange
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-04 16:03 UTC by shineway
Modified: 2025-07-10 10:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shineway 2025-07-04 16:03:58 UTC
Description of problem:

基于6.6内核龙蜥anolis 23版本,我们在megaraid_sas驱动的磁盘控制器上用fio对裸盘进行4k随机读写测试时,发现采用龙蜥默认的bfq调度策略性能相比none调度策略劣化超过5%:

调度算法	        randwrite_iops	randwrite_lat	randwrite_bw	randread_iops	randread_lat	randread_bw
none	        52462.93	0.62	           200	        39526.4	        0.82	        151
mq-deadline	50107.73	0.64	           191	        39253.33	0.83	        149.66
kyber	        50551.46	0.64	           192.66	38980.26	0.83	        148.66
bfq(默认)	49561.6	        0.65	           189.33	37888	        0.85	        144.33

经分析,龙蜥anolis 23(内核6.6)的io调度策略默认使用bfq,是在systemd的udev规则中通过udev规则修改的。目前发现只有fedora版本用的bfq调度器,其他发行版本,如红帽等,都是基于内核原有的调度策略选择。
use-bfq-scheduler.patch这个补丁是在2023年01月13日提交的,使得bfq调度器成为默认的IO调度器,commit链接:
https://gitee.com/src-anolis-os/systemd/commit/d3f597f0dac7355d995e28fb01f4444bc38a8261
Fedora在2019年尝试将该修改提交到systemd社区(参考链接:https://github.com/systemd/systemd/pull/13321),被内核社区维护者Jens Axboe拒掉了,他认为bfq调度器不够稳定,是否选择bfq调度器由发行商自行决定。而fedora是比较激进的版本,所以自行修改了。虽然关于调度策略的讨论时间比较早了,但是现在社区仍然沿用内核默认的调度选择。建议龙蜥社区也采用内核原有调度选择策略。

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 shineway 2025-07-10 10:53:35 UTC
补丁revert后,采用内核默认的IO调度策略:
设备支持硬件多队列时选择none,其他情况选择mq-deadline。