Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
You do this per-user with ulimit. – Anonymous Mar 26 '10 at 15:18
up vote 4 down vote accepted

Use ulimit. In particular ulimit -m.

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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