-
Notifications
You must be signed in to change notification settings - Fork 69
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
New mapped_private
mode: avoid crash by flushing dirty pages when memory pressure gets high.
#1721
Comments
We have a number of caches and will likely have more. Maybe consider a registry of |
Consider adding prometheus metrics to keep track of how often certain functions are used. |
I am not certain the oom_score is a proper indication of system wide pressure. I would like to see more research before it's used more broadly. |
For those interested, I wrote a small program to check oom scores on linux.
|
Needs additional design and research that won't make a Leap 5 timeline. |
The Linux kernel assigns and maintains an Out of Memory (OOM) score on a per-process basis, The valid range is from 0 (never kill) to 1000 (always kill), the lower the value is, the lower is the probability the process will be killed.
We can track this score for Leap, and when the score gets high, flush the dirty pages of our private mapping to disk, lowering the Leap process OOM score, and thus preventing the system from killing our process.
This would make leap function in a somewhat optimal mode, using as much memory as possible for its chainbase db in order to preventing constant writebacks to disk, while still doing occasional writebacks (to avoid crashing) on systems with limited RAM.
The text was updated successfully, but these errors were encountered: