2

i have a binary, which indexes some stuff, it eats all my ram and my swap. Then the server hangs.

I would like to limit its ram usage.

I've looking at cpulimit and /etc/security/limits.conf but both of them focus on cpu limits and user/processes .

Have somebody limited the usage of a certain binary? How can I approach this issue?

Thanks

  • 1
    You do this per-user with ulimit. – Anonymous Mar 26 '10 at 15:18
4

Use ulimit. In particular ulimit -m.

0

limits.conf has several entries to limit memory usage you may consider, i.e. data, rss, stack.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.