Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 11-06-2009, 04:36 AM   #1
LQ Newbie
Registered: Apr 2009
Posts: 4

Rep: Reputation: 0
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....

Old 11-06-2009, 08:15 AM   #2
Registered: Oct 2009
Location: England
Distribution: *buntu, Vector
Posts: 499

Rep: Reputation: 102Reputation: 102
mem=MEMEORY_SIZE. Put it in the grub configuration line that starts 'kernel'.
Old 11-06-2009, 08:34 AM   #3
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,870
Blog Entries: 14

Rep: Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112
You could always install the Xen kernel and setup a virtual machine that has the characteristics you want.
Old 11-06-2009, 09:29 AM   #4
LQ Newbie
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Originally Posted by cantab View Post
mem=MEMEORY_SIZE. Put it in the grub configuration line that starts 'kernel'.
Thanks Cantab, that looks just the job.

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


memory, ram, restrict

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PCIe dma-able memory location in physical memory for Intel Nehalem / Tylersburg arch robvoo Linux - Kernel 4 07-31-2009 06:21 AM
Physical memory request to Linux Kernel tanmay.anjaria Linux - Newbie 2 02-06-2008 11:31 PM
how can i run 3 linux virtual machines without going out of physical memory asterik123 General 7 04-14-2007 05:51 PM
Total system physical memory information in linux bhavishya_goel Linux - Kernel 2 08-15-2006 01:22 PM

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration