Skip to content
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

Monitor memory pressure #25

Open
klausenbusk opened this issue May 14, 2021 · 3 comments
Open

Monitor memory pressure #25

klausenbusk opened this issue May 14, 2021 · 3 comments

Comments

@klausenbusk
Copy link

Hi

For detecting thrashing I think it could be useful to monitor the memory pressure.

some avg10=0.00 avg60=0.00 avg300=0.00 total=0
full avg10=0.00 avg60=0.00 avg300=0.00 total=0

The “some” line indicates the share of time in which at least some tasks are stalled on a given resource.

The “full” line indicates the share of time in which all non-idle tasks are stalled on a given resource simultaneously. In this state actual CPU cycles are going to waste, and a workload that spends extended time in this state is considered to be thrashing. This has severe impact on performance, and it’s useful to distinguish this situation from a state where some tasks are stalled but the CPU is still doing productive work. As such, time spent in this subset of the stall state is tracked separately and exported in the “full” averages.

https://www.kernel.org/doc/html/latest/accounting/psi.html

What do you think? We have swap enabled on all our systems, which is part of the reason I'm asking for this.

@troglobit
Copy link
Owner

Sure, memory pressure is a very interesting metric! I have no time to work on this myself, even though it's not hard writing a plugin for watchdogd. Unless someone beats be to it, I'll have a look once I circle back to this project (we just did a release).

@simobgl
Copy link

simobgl commented Jul 24, 2021

What about tracking hangs or power cuts? Should be trivial to design a mechanism to write every minute on one or more dedicated log files, trimming them at periodic intervals.

@troglobit
Copy link
Owner

Sure, anything's possible. Like I said, though, no time to implement requests. Pull requests are welcome 😎👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants