Server Fault is a question and answer site for system and network administrators. 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

For testing purpose of an application, I would like to limit the RAM of a server. I prefere not to remove the RAM-sticks. I could not find an option in the BIOS. Is there a way to modify this in the Linux configuration?


share|improve this question
up vote 5 down vote accepted

Use ulimit -d $SIZE_IN_KB to limit the data segment of the current bash shell and whatever you launch from it. help ulimit in bash gives you the documentation.

ETA: If you want to limit the whole system, set mem=1G as a boot parameter in grub (doc).

share|improve this answer
Great, it works! – user28362 Dec 15 '09 at 13:28

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.