PHP 8.5.2
Preview: biolatency_example.txt Size: 1.75 KB
/usr/share/doc/bpftrace/examples/biolatency_example.txt

Demonstrations of biolatency, the Linux BPF/bpftrace version.


This traces block I/O, and shows latency as a power-of-2 histogram. For example:

# ./biolatency-kp.bt
Attaching 3 probes...
Tracing block device I/O... Hit Ctrl-C to end.
^C

@usecs:
[256, 512)             2 |                                                    |
[512, 1K)             10 |@                                                   |
[1K, 2K)             426 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[2K, 4K)             230 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@                        |
[4K, 8K)               9 |@                                                   |
[8K, 16K)            128 |@@@@@@@@@@@@@@@                                     |
[16K, 32K)            68 |@@@@@@@@                                            |
[32K, 64K)             0 |                                                    |
[64K, 128K)            0 |                                                    |
[128K, 256K)          10 |@                                                   |

While tracing, this shows that 426 block I/O had a latency of between 1K and 2K
usecs (1024 and 2048 microseconds), which is between 1 and 2 milliseconds.
There are also two modes visible, one between 1 and 2 milliseconds, and another
between 8 and 16 milliseconds: this sounds like cache hits and cache misses.
There were also 10 I/O with latency 128 to 256 ms: outliers. Other tools and
instrumentation, like biosnoop.bt, can shed more light on those outliers.


There is another version of this tool in bcc: https://github.com/iovisor/bcc
The bcc version provides options to customize the output.

"biolatency.bt" is an updated version of "biolatency-kp.bt" and does basically
the same thing utilizing the tracepoints instead of kprobes.

Directory Contents

Dirs: 0 × Files: 38

Name Size Perms Modified Actions
722 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.75 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
2.01 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.87 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
2.93 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
2.60 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
4.80 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
4.50 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.50 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
923 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
846 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
864 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.82 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
844 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.63 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
2.47 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.47 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
8.43 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
980 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
2.38 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
4.40 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.87 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
2.67 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
549 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
541 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.12 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.32 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.06 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.23 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.56 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.13 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
940 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.15 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
680 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.17 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
929 B lrw-r--r-- 2024-03-07 22:14:52
Edit Download
1.92 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download
3.34 KB lrw-r--r-- 2024-03-07 22:14:52
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).