Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

IO statistics

993 bytes added, 10:52, 12 May 2017
no edit summary
== Kernel interface ==
The stats in question are reported via the proc files. Currently it is available in kernels starting from 028stab069.1.
=== Files ===
* <code>/proc/bc/$id/iostat </code>
: statistics for beancounter $id
* <code>/proc/bc/iostat </code>
: statistics for all beancounters
New columns might be added at the end of row in future.
Separate stats exist for fuse and flush, with the that only numeric fields shown report requests and sectors stats (others are 9 and 10always 0). Example of parsing code: parse_proc_iostat() function in [https://src.openvz.org/projects/OVZ/repos/vzstat/browse/src/vzstat.c vzstat.c] === I/O schedulers ===Check available/active I/O schedulers for block device "sda": # cat /sys/block/sda/queue/scheduler noop deadline [cfq] * for "cfq" I/O scheduler: a separate block device line is added in iostat proc file # cat /proc/bc/100/iostat flush 100 . 0 0 0 0 0 7389 1893968 0 0 fuse 100 . 0 0 0 0 0 0 0 0 0 sda 100 . 0 0 0 9000 1843380 245216 55845488 245028 188 * for "deadline" I/O scheduler: no additional per-device line is added, others iops counters for such devices are set added to "flush" line counters (iops limit works) * for "noop" I/O scheduler: iops are not counted (iops limit does not work) * for devices with no I/O scheduler (like logical devices, ceph rbd devices, etc): iops are not counted (iops limit does not work) # cat /sys/block/dm-0./queue/scheduler none  # cat /sys/block/rbd0/queue/scheduler none
=== Queues ===
active = sum(b.used_time - a.used_time) * 100 / interval;
waiting = sum(b.wait_time - ba.wait_time) * 100 / interval;
idle = 100 - (active + waiting);
== See also ==
* [[IO accounting]]
* [[I/O priorities for containers]]* [[I/O limits]]