Memopt++ — an adaptive Linux memory governor in C++
I built a small project called Memopt++ — an adaptive Linux memory governor written in C++.
It monitors memory pressure in real time and uses:
- cgroups v2 (memory limits)
- ZRAM (compressed RAM swap)
- KSM (page deduplication)
- Adaptive pressure-based modes
Goal: prevent system slowdowns and OOM kills under heavy workloads (e.g., 20+ browser tabs, Docker, VSCode on 8GB RAM).
It acts before memory becomes critical instead of reacting after OOM.
Repo: https://github.com/Shivfun99/shiv-memopt
Feedback welcome.
Posted Feb 25, 2026, 9:02 PM UTC
00