LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-06-2009, 04:36 AM   #1
marcdbl
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....

Thanks.
 
Old 11-06-2009, 08:15 AM   #2
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

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

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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
marcdbl
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
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).
 
  


Reply

Tags
memory, ram, restrict



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

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