Tookmund / Swapspace

A fork of Jeroen T. Vermeulen's excellent dynamic swap space manager
GNU General Public License v2.0
128 stars 12 forks source link

PSI (Pressure Stall Information) support for accurate measurement of memory pressure #30

Closed hhoffstaette closed 1 year ago

hhoffstaette commented 3 years ago

Linux PSI (Pressure Stall Information) is a recent addition to the Linux kernel which allows a userspace client to be notified about all sorts of resource pressure, so that countermeasures can be taken as soon as possible. Right now Swapspace polls /proc every second and does the necessary pressure evaluation by itself. It might be more accurate to use PSI for this, and maybe replace polling with being notified (fewer wakeups?). Great article with examples: https://unixism.net/2019/08/linux-pressure-stall-information-psi-by-example/

Tookmund commented 2 years ago

Oh I had not heard about that! Would definitely be more efficient than polling every second but would require rethinking pretty much the entire system of deciding when to allocate new swapfiles as Swapspace currently try to do so before the system has memory problems.

Happy to consider patches of course but unfortunately it’s significant enough of a change that I’m not sure I will have the time to work on it anytime soon.

Jacob

On Jul 1, 2021, at 09:19, Holger Hoffstätte @.***> wrote:

 Linux PSI (Pressure Stall Information) is a recent addition to the Linux kernel which allows to be notified about all sorts of resource pressure, so that countermeasures can be taken as soon as possible. Right now Swapspace polls /proc every second and does the necessary pressure evaluation by itself. It might be more accurate to use PSI for this, and maybe replace polling with being notified (fewer wakeups?). Great article with examples: https://unixism.net/2019/08/linux-pressure-stall-information-psi-by-example/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.