Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
Other
>
Operation System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
128
Star
73
Fork
330
src-openEuler
/
kernel
Closed
Code
Issues
1197
Pull Requests
35
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
openEuler-22.03-LTS-SP1 Bcache I/O跌零严重持续时间长 且很频繁,基本无法使用
Done
#I7JFSR
Bug
wmmy2023
Opened this issue
2023-07-07 15:22
<!-- #请根据issue的类型在标题右侧下拉框中选择对应的选项(需求、缺陷或CVE等)--> <!-- #请根据issue相关的版本在里程碑中选择对应的节点,若是与版本无关,请选择“不关联里程碑”--> 【标题描述】能够简要描述问题:说明什么场景下,做了什么操作,出现什么问题(尽量使用正向表达方式) 【环境信息】 硬件信息: Intel x86 软件信息: openEuler-22.03-LTS-SP1 【问题复现步骤】 使用默认参数创建bcache,回写模式 make-bcache -C /dev/nvme0n1 -B /dev/sdc --writeback [root@cvknode2 internal]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sdc 8:32 0 21.8T 0 disk └─bcache0 252:0 0 21.8T 0 disk nbd6 43:192 0 0B 0 disk nbd7 43:224 0 0B 0 disk nvme0n1 259:0 0 1.7T 0 disk └─bcache0 252:0 0 21.8T 0 disk nbd8 43:256 0 0B 0 disk 然后用fio进行性能测试 fio -filename=/dev/bcache0 -direct=1 -iodepth 128 -thread -rw=randwrite -ioengine=libaio -bs=4k -size=20G -numjobs=10 -group_reporting -name=mytest Jobs: 10 (f=10): [w(10)] [16.9% done] [0KB/0KB/0KB /s] [0/0/0 iops] [eta 02m:32s] 在跑1分钟左右后,出现IO跌零, 30s后恢复; 再跑1分钟左右后,IO又跌零了, 基本无法正常使用。 我们发现IO跌零,是由于bcache在执行gc,而且每次gc的时间长达30s, gc期间fio IO是hung住的,gc完成io恢复正常。 bcache_gc-3606729 [049] .... 71464.409207: bcache_gc_start: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [005] .... 71499.522789: bcache_gc_end: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [084] .... 71578.552813: bcache_gc_start: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [025] .... 71615.268290: bcache_gc_end: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [066] .... 71699.942505: bcache_gc_start: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [067] .... 71736.177378: bcache_gc_end: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache gc期间, fio process hung stack: => bch_bucket_alloc => __bch_bucket_alloc_set => bch_alloc_sectors => bch_data_insert_start => cached_dev_write => cached_dev_submit_bio => __submit_bio_noacct => __blkdev_direct_IO => generic_file_direct_write => __generic_file_write_iter => blkdev_write_iter => aio_write => io_submit_one => __se_sys_io_submit 为什么bcache gc需要花这么长时间? 而且fio测试过程中gc非常频繁, 请问这个有优化手段吗? 或者bcache有什么参数可以调整来解决/缓解这个问题? 非常感谢! [root@~]# bcache show Name Type State Bname AttachToDev /dev/nvme0n1 3 (cache) active N/A N/A /dev/sdc 1 (data) dirty(running) bcache0 /dev/nvme0n1 [root~]# bcache-super-show /dev/nvme0n1 sb.magic ok sb.first_sector 8 [match] sb.csum 9E00C0CCCB3737CD [match] sb.version 3 [cache device] dev.label (empty) dev.uuid e3077d11-85f2-4e40-bb4b-163b7221d559 dev.sectors_per_block 1 dev.sectors_per_bucket 1024 dev.cache.first_sector 1024 dev.cache.cache_sectors 3750747136 dev.cache.total_sectors 3750748160 dev.cache.ordered yes dev.cache.discard no dev.cache.pos 0 dev.cache.replacement 0 [lru] cset.uuid a8ee1098-3cb6-4782-9dc0-89da9f64d701 [root@~]# bcache-super-show /dev/sdc sb.magic ok sb.first_sector 8 [match] sb.csum CEDD967E618B8161 [match] sb.version 1 [backing device] dev.label ecloud-hdd dev.uuid fb44df29-f763-4a5a-9548-7d3c65f7a9e4 dev.sectors_per_block 1 dev.sectors_per_bucket 1024 dev.data.first_sector 16 dev.data.cache_mode 1 [writeback] dev.data.cache_state 2 [dirty] cset.uuid a8ee1098-3cb6-4782-9dc0-89da9f64d701 出现概率(是否必现,概率性错误) 基本必现 【预期结果】 使用bcache加速 fio测试性能IO波动应该很小 【实际结果】 跌零严重持续时间长 且很频繁,基本无法使用 【附件信息】 比如系统message日志/组件日志、dump信息、图片等
<!-- #请根据issue的类型在标题右侧下拉框中选择对应的选项(需求、缺陷或CVE等)--> <!-- #请根据issue相关的版本在里程碑中选择对应的节点,若是与版本无关,请选择“不关联里程碑”--> 【标题描述】能够简要描述问题:说明什么场景下,做了什么操作,出现什么问题(尽量使用正向表达方式) 【环境信息】 硬件信息: Intel x86 软件信息: openEuler-22.03-LTS-SP1 【问题复现步骤】 使用默认参数创建bcache,回写模式 make-bcache -C /dev/nvme0n1 -B /dev/sdc --writeback [root@cvknode2 internal]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sdc 8:32 0 21.8T 0 disk └─bcache0 252:0 0 21.8T 0 disk nbd6 43:192 0 0B 0 disk nbd7 43:224 0 0B 0 disk nvme0n1 259:0 0 1.7T 0 disk └─bcache0 252:0 0 21.8T 0 disk nbd8 43:256 0 0B 0 disk 然后用fio进行性能测试 fio -filename=/dev/bcache0 -direct=1 -iodepth 128 -thread -rw=randwrite -ioengine=libaio -bs=4k -size=20G -numjobs=10 -group_reporting -name=mytest Jobs: 10 (f=10): [w(10)] [16.9% done] [0KB/0KB/0KB /s] [0/0/0 iops] [eta 02m:32s] 在跑1分钟左右后,出现IO跌零, 30s后恢复; 再跑1分钟左右后,IO又跌零了, 基本无法正常使用。 我们发现IO跌零,是由于bcache在执行gc,而且每次gc的时间长达30s, gc期间fio IO是hung住的,gc完成io恢复正常。 bcache_gc-3606729 [049] .... 71464.409207: bcache_gc_start: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [005] .... 71499.522789: bcache_gc_end: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [084] .... 71578.552813: bcache_gc_start: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [025] .... 71615.268290: bcache_gc_end: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [066] .... 71699.942505: bcache_gc_start: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache_gc-3606729 [067] .... 71736.177378: bcache_gc_end: 2e125086-a7b8-4240-898f-b11fc5f3a3ec bcache gc期间, fio process hung stack: => bch_bucket_alloc => __bch_bucket_alloc_set => bch_alloc_sectors => bch_data_insert_start => cached_dev_write => cached_dev_submit_bio => __submit_bio_noacct => __blkdev_direct_IO => generic_file_direct_write => __generic_file_write_iter => blkdev_write_iter => aio_write => io_submit_one => __se_sys_io_submit 为什么bcache gc需要花这么长时间? 而且fio测试过程中gc非常频繁, 请问这个有优化手段吗? 或者bcache有什么参数可以调整来解决/缓解这个问题? 非常感谢! [root@~]# bcache show Name Type State Bname AttachToDev /dev/nvme0n1 3 (cache) active N/A N/A /dev/sdc 1 (data) dirty(running) bcache0 /dev/nvme0n1 [root~]# bcache-super-show /dev/nvme0n1 sb.magic ok sb.first_sector 8 [match] sb.csum 9E00C0CCCB3737CD [match] sb.version 3 [cache device] dev.label (empty) dev.uuid e3077d11-85f2-4e40-bb4b-163b7221d559 dev.sectors_per_block 1 dev.sectors_per_bucket 1024 dev.cache.first_sector 1024 dev.cache.cache_sectors 3750747136 dev.cache.total_sectors 3750748160 dev.cache.ordered yes dev.cache.discard no dev.cache.pos 0 dev.cache.replacement 0 [lru] cset.uuid a8ee1098-3cb6-4782-9dc0-89da9f64d701 [root@~]# bcache-super-show /dev/sdc sb.magic ok sb.first_sector 8 [match] sb.csum CEDD967E618B8161 [match] sb.version 1 [backing device] dev.label ecloud-hdd dev.uuid fb44df29-f763-4a5a-9548-7d3c65f7a9e4 dev.sectors_per_block 1 dev.sectors_per_bucket 1024 dev.data.first_sector 16 dev.data.cache_mode 1 [writeback] dev.data.cache_state 2 [dirty] cset.uuid a8ee1098-3cb6-4782-9dc0-89da9f64d701 出现概率(是否必现,概率性错误) 基本必现 【预期结果】 使用bcache加速 fio测试性能IO波动应该很小 【实际结果】 跌零严重持续时间长 且很频繁,基本无法使用 【附件信息】 比如系统message日志/组件日志、dump信息、图片等
Comments (
4
)
Sign in
to comment
Status
Done
Backlog
已挂起
Fixing
Confirmed
Done
Accepted
Canceled
Assignees
Not set
Labels
sig/Kernel
Not set
Projects
Unprojected
Unprojected
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(5)
1
https://gitee.com/src-openeuler/kernel.git
git@gitee.com:src-openeuler/kernel.git
src-openeuler
kernel
kernel
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register