You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
looking at src/Linux/readDiskCounters.c, and digging into /proc filesystem, I think there is an error on computations.
From my point of view, using kernel 3.10.0-1127.10.1.el7.x86_64, if I do a cat diskstat, I have:
LIne 1 we have /dev/vda and line 2 /dev/vda1, which is a partition of /dev/vda:
[root@host ~]# fdisk -l /dev/vda
Disk /dev/vda: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0000aebb
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 20971486 10484719+ 83 Linux
So, looking at code, I am pretty sure that total of read/writes are vda + vda1, but, I think that reads of vda1 are compound into value of vda's reads.
So, result seems to be incorrect.
I tried to fix that by myself, but it seems that it is much more complicated.
The code that does total is:
// report the sum over all disks - except software RAID devices and logical volumes
// because that would cause double-counting. We identify those by their
// major numbers:
// Software RAID = 9
// Logical Vol = 253
if (majorNo != 9 && majorNo != 253) {
dsk->reads += reads;
total_sectors_read += sectors_read;
dsk->read_time += read_time_ms;
dsk->writes += writes;
total_sectors_written += sectors_written;
dsk->write_time += write_time_ms;
}
(lines 94 -> 106)
And I think that the second problem is that VirtIO devices in this particular case are ignored of computation?
The text was updated successfully, but these errors were encountered:
Thanks for looking at this. When the code considers vda and vda1 counters is there a clear difference in the major and minor numbers, or do we need to pull in something else to help discern?
This code has not been looked at for some time so there may be other new constructs and filesystems to take into account. Or it may be better to start with the cgroup stats under /sys if io-accounting is enabled. Probably worth looking around to see where the most reliable totals can be found.
Hello,
looking at
src/Linux/readDiskCounters.c
, and digging into/proc
filesystem, I think there is an error on computations.From my point of view, using kernel 3.10.0-1127.10.1.el7.x86_64, if I do a cat diskstat, I have:
LIne 1 we have /dev/vda and line 2 /dev/vda1, which is a partition of /dev/vda:
So, looking at code, I am pretty sure that total of read/writes are vda + vda1, but, I think that reads of vda1 are compound into value of vda's reads.
So, result seems to be incorrect.
I tried to fix that by myself, but it seems that it is much more complicated.
The code that does total is:
(lines 94 -> 106)
And I think that the second problem is that VirtIO devices in this particular case are ignored of computation?
The text was updated successfully, but these errors were encountered: