LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Restricting available physical memory in Linux (http://www.linuxquestions.org/questions/linux-kernel-70/restricting-available-physical-memory-in-linux-767262/)

marcdbl 11-06-2009 05:36 AM

Restricting available physical memory in Linux
 
I am doing some application testing, using CentOS 5 running on x64 with 32GB of physical memory.
I want to see how the application behaves when only 8GB of physical memory is present in the server. Is there a way I can artificially restrict the physical memory to a lower amount such as this?

I can't remove DIMMs from the machine as it's in a remote datacentre.

Windows makes it easy using the /maxmem boot options, but I can't find any reference to such a trick in Linux....

Thanks.

cantab 11-06-2009 09:15 AM

mem=MEMEORY_SIZE. Put it in the grub configuration line that starts 'kernel'.

MensaWater 11-06-2009 09:34 AM

You could always install the Xen kernel and setup a virtual machine that has the characteristics you want.

marcdbl 11-06-2009 10:29 AM

Quote:

Originally Posted by cantab (Post 3747025)
mem=MEMEORY_SIZE. Put it in the grub configuration line that starts 'kernel'.

Thanks Cantab, that looks just the job. :cool:

(Unfortunately I need to be testing native performance so Xen is no-go in this case).


All times are GMT -5. The time now is 11:32 PM.