8
2
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 virtual machine for this? I'm using Ubuntu 9.10.
Thanks, nice hint! As I understand ulimit, it limits all users memory/process/whatever consumption. I just like to limit it to one user/process & subprocesses. – guerda – 2009-11-05T21:52:02.683
1ulimit is a shell command, and only affects processes started from the same shell after ulimit is executed. You startup the process in a shell script with a ulimit command to have it affect just that process. – KeithB – 2009-11-06T01:52:30.573