opencontainers / opencontainers/runc
blkio GetStats can't get right IoServiceBytesRecursive in mixed disk scheduler(CFQ)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
two disk in my node,hdd and nvme, sda scheduler is cfq and nvme is none
Docker Root Dir: /home/docker_rt
container mount localpath in nvme, but i can't get disk io form cadvisor(nothing but sda 0)
root@xxx:~$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
root@xxx:~$ uname -a
Linux xxx 3.10.0-514.16.1.el7.stable.v1.3.x86_64 #1 SMP Fri Feb 14 16:28:32 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
root@xxx:~$ cat /sys/block/sda/queue/scheduler
noop deadline [cfq]
root@xxx:~$ cat /sys/block/nvme0n1/queue/scheduler
none
root@xxx:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 460878920 289748544 147695880 67% /
/dev/nvme0n1 3513908388 1970755228 1543153160 57% /home
root@xxx:~$ cat $CONTAINER_CGROPU_BLKIO/blkio.io_service_bytes
8:0 Read 0
8:0 Write 0
8:0 Sync 0
8:0 Async 0
8:0 Total 0
Total 0
root@xxx:~$ cat $CONTAINER_CGROPU_BLKIO/blkio.io_serviced_recursive
8:0 Read 0
8:0 Write 0
8:0 Sync 0
8:0 Async 0
8:0 Total 0
Total 0
root@xxx:~$ cat $CONTAINER_CGROPU_BLKIO/blkio.io_service_bytes_recursive
8:0 Read 0
8:0 Write 0
8:0 Sync 0
8:0 Async 0
8:0 Total 0
Total 0
libcontainer/cgroups/fs/blkio.go func GetStats get cfqStats,not include nvme
I guess zhe func should get stats.BlkioStats.IoServiceBytesRecursive from blkio.throttle.io_service_bytes when use CFQ scheduler
root@xxx:~$ cat $CONTAINER_CGROPU_BLKIO/blkio.throttle.io_service_bytes
8:0 Read 0
8:0 Write 0
8:0 Sync 0
8:0 Async 0
8:0 Total 0
259:0 Read 321507328
259:0 Write 530447441920
259:0 Sync 505826488320
259:0 Async 24942460928
259:0 Total 530768949248
Total 530768949248
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in libcontainer/cgroups/fs/blkio.go at GetStats, then compare how CFQ statistics are read with the blkio.throttle.io_service_bytes output shown in the report. Reproduce or inspect the mixed CFQ and NVMe scheduler case, and verify that IoServiceBytesRecursive reports the relevant device activity rather than only sda values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100