| 1 |
Examples of fsslower-nd.stp, the Linux SystemTap version. |
| 2 |
|
| 3 |
|
| 4 |
This tool prints event-by-event details for each file system synchronous read |
| 5 |
or write slower than a threshold. It works by dynamically traces two common |
| 6 |
file system functions: do_sync_read() and do_sync_write(). Many, but not all, |
| 7 |
file systems and workloads use these functions. Tracing their time provides one |
| 8 |
view of suffered file system latency. |
| 9 |
|
| 10 |
Tracing FS sync reads and writes slower than 5 ms: |
| 11 |
|
| 12 |
# ./fsslower-nd.stp 5 |
| 13 |
Tracing FS sync reads and writes slower than 5 ms... Hit Ctrl-C to end. |
| 14 |
TIME PID COMM FUNC SIZE LAT(ms) |
| 15 |
22:27:28 2346 randread.pl do_sync_read 8192 11 |
| 16 |
22:27:28 2346 randread.pl do_sync_read 8192 14 |
| 17 |
22:27:28 2346 randread.pl do_sync_read 8192 6 |
| 18 |
22:27:28 2346 randread.pl do_sync_read 8192 5 |
| 19 |
22:27:28 2346 randread.pl do_sync_read 8192 6 |
| 20 |
22:27:28 2346 randread.pl do_sync_read 8192 5 |
| 21 |
22:27:28 2346 randread.pl do_sync_read 8192 24 |
| 22 |
22:27:28 2346 randread.pl do_sync_read 8192 12 |
| 23 |
22:27:28 2346 randread.pl do_sync_read 8192 9 |
| 24 |
22:27:28 2346 randread.pl do_sync_read 8192 9 |
| 25 |
22:27:28 2346 randread.pl do_sync_read 8192 5 |
| 26 |
22:27:28 2346 randread.pl do_sync_read 8192 8 |
| 27 |
22:27:28 2346 randread.pl do_sync_read 8192 14 |
| 28 |
22:27:28 2346 randread.pl do_sync_read 8192 10 |
| 29 |
22:27:28 2346 randread.pl do_sync_read 8192 6 |
| 30 |
22:27:28 2346 randread.pl do_sync_read 8192 5 |
| 31 |
[...] |
| 32 |
|
| 33 |
This shows that the randread.pl process was suffering latency up to 26 ms, when |
| 34 |
issuing do_sync_read()s of 8 Kbytes. |
| 35 |
|
| 36 |
As this is designed to be a non-debuginfo tool, there are not that many details |
| 37 |
available. Investigate further using other tools and custom SystemTap. |