Question about strange phenomenon of cgroup blkio stat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All

I’m new to cgroup and block layer, recently I found a strange phenomenon in cgroup blkio stat as blow.

I setup a blkio cgroup and wrote 1GB data in direct mode, but the stat indicated almost wrote 2.56GB, 

I tested several times in physical machine on cgroup v1 & v2 and both were same results, but interesting

thing is when testing on VM(virtual machine) the stat is exactly the same as the data size had written.

Could anyone give me a hint or explanation for this?


testing info:
-------------------------------------------------------------

$ uname -r
4.15.2

$ echo $$
4242

$ cat /cgroup2/22/cgroup.procs
4242
13868

$ cat cgroup.controllers
io memory

$ df /mnt/sdb1
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sdb1      209612800 18102292 191510508   9% /mnt/sdb1

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb      8:16   0 557.9G  0 disk
├─sdb2   8:18   0 357.9G  0 part
└─sdb1   8:17   0   200G  0 part /mnt/sdb1
sdc      8:32   0 557.9G  0 disk
├─sdc2   8:34   0   100G  0 part
├─sdc3   8:35   0   100G  0 part
├─sdc1   8:33   0   100G  0 part
└─sdc4   8:36   0 257.9G  0 part
sda      8:0    0 557.9G  0 disk
├─sda2   8:2    0 542.2G  0 part /
└─sda1   8:1    0  15.6G  0 part [SWAP]


$ dd if=/dev/zero of=/mnt/sdb1/22/test bs=1M count=1024 oflag=direct
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 2.47852 s, 433 MB/s


$ cat /cgroup2/22/io.stat
8:0 rbytes=1105920 wbytes=36864 rios=59 wios=4
8:16 rbytes=10330624 wbytes=2693799936 rios=102 wios=4105




Thanks,
Chengguang.



--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux