blob: 36d6d7e13a3a81e3d05b8d49c87570a0bcb7894d [file] [log] [blame]
Brendan Greggbea34302016-02-13 21:07:23 -08001Demonstrations of mdflush, the Linux eBPF/bcc version.
2
3
4The mdflush tool traces flushes at the md driver level, and prints details
5including the time of the flush:
6
7# ./mdflush
8Tracing md flush requests... Hit Ctrl-C to end.
9TIME PID COMM DEVICE
1003:13:49 16770 sync md0
1103:14:08 16864 sync md0
1203:14:49 496 kworker/1:0H md0
1303:14:49 488 xfsaild/md0 md0
1403:14:54 488 xfsaild/md0 md0
1503:15:00 488 xfsaild/md0 md0
1603:15:02 85 kswapd0 md0
1703:15:02 488 xfsaild/md0 md0
1803:15:05 488 xfsaild/md0 md0
1903:15:08 488 xfsaild/md0 md0
2003:15:10 488 xfsaild/md0 md0
2103:15:11 488 xfsaild/md0 md0
2203:15:11 488 xfsaild/md0 md0
2303:15:11 488 xfsaild/md0 md0
2403:15:11 488 xfsaild/md0 md0
2503:15:11 488 xfsaild/md0 md0
2603:15:12 488 xfsaild/md0 md0
2703:15:13 488 xfsaild/md0 md0
2803:15:15 488 xfsaild/md0 md0
2903:15:19 496 kworker/1:0H md0
3003:15:49 496 kworker/1:0H md0
3103:15:55 18840 sync md0
3203:16:49 496 kworker/1:0H md0
3303:17:19 496 kworker/1:0H md0
3403:20:19 496 kworker/1:0H md0
3503:21:19 496 kworker/1:0H md0
3603:21:49 496 kworker/1:0H md0
3703:25:19 496 kworker/1:0H md0
38[...]
39
40This can be useful for correlation with latency outliers or spikes in disk
41latency, as measured using another tool (eg, system monitoring). If spikes in
42disk latency often coincide with md flush events, then it would make flushing
43a target for tuning.
44
45Note that the flush events are likely to originate from higher in the I/O
46stack, such as from file systems. This traces md processing them, and the
47timestamp corresponds with when md began to issue the flush to disks.