cachestat(8) | System Manager's Manual | cachestat(8) |
cachestat - Statistics for linux page cache hit/miss ratios. Uses Linux eBPF/bcc.
cachestat [-T] [interval [count]]
This traces four kernel functions and prints per-second summaries. This can be useful for general workload characterization, and looking for patterns in operation usage over time.
This works by tracing kernel page cache functions using dynamic tracing, and will need updating to match any changes to these functions. Edit the script to customize which functions are traced.
Since this uses BPF, only the root user can use this tool.
CONFIG_BPF and bcc.
This traces various kernel page cache functions and maintains in-kernel counts, which are asynchronously copied to user-space. While the rate of operations can be very high (>1G/sec) we can have up to 34% overhead, this is still a relatively efficient way to trace these events, and so the overhead is expected to be small for normal workloads. Measure in a test environment.
This is from bcc.
Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.
Linux
Unstable - in development.
Allan McAleavy
https://github.com/brendangregg/perf-tools/blob/master/fs/cachestat
2016-01-30 | USER COMMANDS |