Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
1  
You do this per-user with ulimit. –  Anonymous Mar 26 '10 at 15:18

2 Answers 2

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

 
discard

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.