-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cachestat shows negative numbers #21
Comments
Hi there,
What's the meaning of this negative number? Cheers, |
I'm seeing this too, it looks like here's a debug sample output:
|
Is it possible |
I am also facing the same problem. May I know the reason and how to resolve it? @brendangregg |
Hmmm. I'm on Debian and do not see this problem.
|
Nope. I'll take my statement back. After running for some time, I could see the negative numbers.
|
Thanks @rickysarraf |
I have no clue. The tool does mention that it may misbehave with newer kernels, and was written initially for the 3.13 kernel only. |
From the man page I wrote:
Please read the man pages. I also wrote a blog post on this tool in particular, http://www.brendangregg.com/blog/2014-12-31/linux-page-cache-hit-ratio.html with the conclusion: Hopefully in the future the kernel will provide an easy way to measure page cache activity, be it from /proc or tracepoints. In the meantime, I have cachestat which works for my kernel versions. Its current implementation is brittle, and may not work well on other versions without modifications, so its greatest value may be showing what can be done with a little effort. I've tried to make it abundantly clear that this tool is brittle, and will need hand-holding to work on any given kernel, until either tracepoints exist or /proc statistics. I'll do the temporary hand-holding for the kernels my employer uses, but I'm too busy to do that for every kernel that exists. If this sounds like cachestat is too brittle and there should be a better way, then yes, that's what I've been saying all along. I may well contribute to fixing the kernel with one of those better ways, when it gets to the top of my todo list. Fell free to help with that kernel work, which might include fixing Keiichi's page monitoring patch to work on newer kernels, and then getting it merged. Once we have tracepoints (or /proc), cachestat will need one update and will then work forever. Since writing this ftrace version, it's been ported to bcc, and the probes were posted to the linux-mm mailing list to see if those engineers (who actually wrote the kernel memory allocation code) agreed with the methodology. Last I heard there was no response. So right now, no one has told me there's a better way than what I'm already doing. And what I'm doing is pretty brittle. We need to improve the kernel. |
Hi,
i dont think this is normal:
This is on RHEL.
does it wrap around or something ?
The text was updated successfully, but these errors were encountered: