DEV Community

Shiv Kumar Mishra
Shiv Kumar Mishra

Posted on

Memopt++:Adaptive Linux Memory Governor (C++)

 A small tool called Memopt++ to help prevent Linux systems from slowing down or hitting OOM under heavy workloads.

It monitors memory pressure in real time and reacts early by:

Applying memory limits to heavy apps using cgroups v2

Compressing inactive memory with ZRAM

Merging duplicate pages using KSM

Scaling control automatically as pressure increases

Example: On an 8GB machine with 20+ browser tabs + Docker, instead of RAM jumping to 95% and freezing, it stabilizes usage earlier.

It doesnโ€™t add more RAM it just manages it smarter.

Repo: https://github.com/Shivfun99/shiv-memopt

Open to feedback / suggestions.

Top comments (0)