Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

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

Is there any way to limit using RAM for mongodb on Debian? I'm looking for a solution fo about 8 hours, but have no results.

share|improve this question

migrated from Jan 6 '13 at 14:35

This question came from our site for professional and enthusiast programmers.

You could use ulimit but it could effect performance if your working set exceeds the amount you allocate – Sammaye Jan 5 '13 at 23:42

I have heard that some folks have had success using lxc to isolate MongoDB on Linux. There are other container technologies out there, but that seems to be the most mainstream option.

share|improve this answer

It is possible using cgroups.

Some tutorials are available as well as shell script for Ubuntu 14.04.

See also Is there any option to limit mongodb memory usage? on Stack Overflow.

share|improve this answer

Your Answer


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