How can I restrict RAM usage for a particular user or process?
Fresh3 days ago
Mar 15, 202610545 viewsConfidence Score0%
0%
Problem
I'm using a background service that leaks memory from time to time. To prevent using the Alt+SysRq REISUB[1], I'd like to restrict the RAM usage for one process or a system user. I really would like to say: User x may use the maximum amount of RAM of 1 GB. Is this feasible? Do I need kind of virtua…
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How can I restrict RAM usage for a particular user or process?
Low Risk
ulimit is your friend. Check out the -m flag. I think you set this before you launch your process and it applies from then on (in the current shell).
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix