Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcachetop

pcachetop is a Linux page-cache attribution and refault-like churn profiler written in Rust.

It reports observed file/inode residency, hot regions, eviction-like deletes, delete-to-add churn, and the processes associated with page-cache population. Residency is an event-derived estimate; dev:inode is the stable identity and paths are best-effort display metadata.

Build

cargo build --release

Binary:

target/release/pcachetop

Usage

Live view:

sudo target/release/pcachetop live --interval 1s --bucket-size 1MiB

Record and report:

sudo target/release/pcachetop record --duration 30s --out /tmp/trace.pcache.jsonl
target/release/pcachetop report /tmp/trace.pcache.jsonl --index fixtures/indexes/workloads.index.jsonl

Path resolution:

target/release/pcachetop index --root /tmp/pcachetop-test --out /tmp/pcachetop-index.jsonl
target/release/pcachetop resolve --dev 253:0 --inode 12345 --index /tmp/pcachetop-index.jsonl

Notes

  • record and live currently use perf record and perf script.
  • Live mode uses a background /proc/*/fd resolver unless --no-proc-fds is set.
  • Terminal tables use fixed-width columns, middle-truncated paths, and file-level LAST_ADD_PID values in pid:processName form.
  • Process attribution means observed demand/population context, not ownership.
  • Delete events are eviction-like and may also reflect truncation, invalidation, or explicit cache dropping.
  • Kernel tracepoint fields vary by kernel version.

About

Tools to better understand Linux page-cache attribution

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages