Memopt++ — an adaptive Linux memory governor in C++

Feedback

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.

https://preview.redd.it/tjj9pingfplg1.jpg?width=1600&format=pjpg&auto=webp&s=3feb5465d1e31ca94e3c06c9844e77e4405d58fd

Posted Feb 25, 2026, 8:57 PM UTC

032
Loading comments…