LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2009, 10:46 PM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
Pre-allocating memory?


I have RHEL AS 4 Update 6 x86_64 Machine with 16 GB RAM running on one of the Blade Server.I want to pre-allocate 8GB Memory for performance testing.How Can I make it happen?

NOTE - physical removal of memory is no option).

Last edited by your_shadow03; 02-04-2009 at 11:05 PM.
 
Old 02-05-2009, 01:48 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
Yes.

Quoted from /usr/src/linux-2.6.27-7/Documentation/kernel-parameters.txt:
Code:
	mem=nn[KMG]	[KNL,BOOT] Force usage of a specific amount of memory
			Amount of memory to be used when the kernel is not able
			to see the whole system memory or for test.
			[X86-32] Use together with memmap= to avoid physical
			address space collisions. Without memmap= PCI devices
			could be placed at addresses belonging to unused RAM.

	mem=nopentium	[BUGS=X86-32] Disable usage of 4MB pages for kernel
			memory.

	memmap=exactmap	[KNL,X86-32,X86_64] Enable setting of an exact
			E820 memory map, as specified by the user.
			Such memmap=exactmap lines can be constructed based on
			BIOS output or other requirements. See the memmap=nn@ss
			option description.

	memmap=nn[KMG]@ss[KMG]
			[KNL] Force usage of a specific region of memory
			Region of memory to be used, from ss to ss+nn.

	memmap=nn[KMG]#ss[KMG]
			[KNL,ACPI] Mark specific memory as ACPI data.
			Region of memory to be used, from ss to ss+nn.

	memmap=nn[KMG]$ss[KMG]
			[KNL,ACPI] Mark specific memory as reserved.
			Region of memory to be used, from ss to ss+nn.
			Example: Exclude memory from 0x18690000-0x1869ffff
			         memmap=64K$0x18690000
			         or
			         memmap=0x10000$0x18690000
 
Old 02-05-2009, 02:10 AM   #3
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466

Original Poster
Blog Entries: 6

Rep: Reputation: 51
Thats Really Informative Stuff..
I need some more help.How Can I set these kernel parameters anyway?
 
Old 02-05-2009, 02:33 AM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466

Original Poster
Blog Entries: 6

Rep: Reputation: 51
Do I need to customize the kernel?
On which file I need to make the entry?

Last edited by your_shadow03; 02-05-2009 at 02:59 AM.
 
Old 02-05-2009, 02:58 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
These are parameters you can give at time of booting.

To try one, write at time of booting:
<kernel_image_name> <kernel_parameter>=<value>

e.g. My only kernel image name for now is Linux (set up in lilo). So I could type at start up:
Linux mem=123456

Once you have found the good value(s) for your parameter(s) you can include it in an "append=" statement if yu use lilo. For grub I do not know, I do not use it.
 
Old 02-05-2009, 03:06 AM   #6
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466

Original Poster
Blog Entries: 6

Rep: Reputation: 51
I am using GRUB and that too a Blade server. Do I need to reboot for GRUB to display or anything I can in runtime?
I will need to reboot the blade server?
 
Old 02-05-2009, 04:19 AM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
Of course you have to reboot to set-up kernel parameters values at start up.

If you do not want to and you use the bash shell, you can instead setup limits at run-time, including for memory allocation, to processes launched by the shell.

To know the actual limits open a terminal or a console and type:
Code:
ulimit -a
So to set-up max memory size (value in kbytes):
Code:
ulimit -m <value>

Last edited by Didier Spaier; 02-05-2009 at 04:43 AM.
 
Old 02-10-2009, 11:35 AM   #8
msright1981
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Rep: Reputation: 0
Nice tip, but why?

Hi,

May I ask why do u want to disable the extra memory in your blade without removing them, although you have to restart the server any way? just from curiosity.
 
Old 02-10-2009, 10:10 PM   #9
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466

Original Poster
Blog Entries: 6

Rep: Reputation: 51
All I needed was to restrict the memory for particular process..Thats it...And I should allocate the rest for other process.
But I see no option to allocate remaining to other prcesses?
Do you have any?
 
  


Reply



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
what process is allocating memory and causing oom-kill? thormk Linux - Server 3 04-22-2008 08:40 AM
Problem in allocating shared memory size more then 672 shashwat.gupta Linux - Kernel 1 05-08-2006 12:15 PM
Problem in allocating shared memory size more then 672 shashwat.gupta Linux - Software 1 05-08-2006 12:14 PM
Allocating Memory in the kernel arunachalam Linux - Software 4 10-12-2005 08:51 AM
allocating memory eshwar_ind Programming 6 02-26-2004 07:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:54 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