per-tools 是性能優化大師brendan gregg 就有perf 以及ftrace 編寫的性能優化工具集
提供了io 、網絡、系統調用。。。大部分方面的性能分析工具。
一張參考圖
安裝
- clone 代碼
git clone --depth 1 https://github.com/brendangregg/perf-tools
- 基本使用
查看io 延遲
./iolatency -Q
效果
./iolatency -Q
Tracing block I/O. Output every 1 seconds. Ctrl-C to end.
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
1 -> 2 : 0 | |
2 -> 4 : 0 | |
4 -> 8 : 0 | |
8 -> 16 : 2 |######################################|
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
>=(ms) .. <(ms) : I/O |Distribution |
0 -> 1 : 0 | |
^C
說明
perf-tools 使用簡單,同時github 上也提供了比較全的demo,可以方便學習