[BCC] Questions about formulas of Page Cache Hit/Miss in "cachestat" and "cachetop" under bcc/tools
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
Hello everyone,
We are looking for correct formulas to calculate Page Cache Hit/Miss
rate. We looked into "cachestat" and "cachetop" under "bcc/tools", and
found that the formulas are different For example, the definitions of
MPA, mark_page_accessed(), are different in the two programs.
According to "idle_page_tracking.rst" under the Linux source code, MPA
can be invoked by read() and write(). Therefore we are not sure that
the definition of MPA in "cachetop" (MPA = reads) is correct,
especially since their hook function and eBPF prog are literally the
same. Similar problems happen to the calculation of "Misses" as well.
We were wondering if we missed anything or if this is a chance to
contribute to the community. Please let us know. #bcc
Thank you,
Contributor guide
No contributing guide indexed for this repository
Research direction
Compare the Page Cache Hit/Miss formulas in bcc/tools/cachestat and bcc/tools/cachetop, focusing on their definitions of MPA, mark_page_accessed(), and the shared hook and eBPF program. Read idle_page_tracking.rst and trace the read() and write() behavior; done means the formula discrepancy is explained and the correct definitions are documented or identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- observability-sre, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100