How to allocate maxmem in Linux?
In Windows this done in the boot.ini file or by using a Windows utility called bcdedit.
bcdedit /set TRUNCATEMEMORY the_mem_size Does anyone know how to issue a similar command under Linux. An example under Linux will be appreciated... |
What exactly does setting maxmem do in Windows? That is to say does it limit the amount of memory used over all in a system? Used by a single process? Used by a single user? Is it system memory (RAM)? Network memory? Something else? What exactly do you want to limit the memory for - a specific application? Does it use shared memory structures on Linux?
There are various memory settings available in UNIX/Linux and what you need to set depends a lot on what you're doing. You could type "man sysctl" for a good overview of System kernel/network settings that are available. |
If you wish to limit the (total) memory the kernel sees (and uses) merely pass a parameter to it (the kernel) via your bootloader.
mem=nn[KMG] |
Yes indeed - I need to limit the (total) memory the kernel sees (and uses). Follow-up question, is the "bootloader" you referenced a file? What is the name and where is it located in Linux?? Is obvious I am a neophyte in Linux and so I crave your indulgence - pardon my ignorance...:-)
|
All bootloaders use a configuration file - boot.ini in the Windows case. Linux offers more than one bootloader - as you've given no indication of your distribution and version it's hard to guess which you might be using.
|
Re: How to allocate maxmem in Linux?
Accept my apologies - The versions of interest are RHEL6.0 x86-64 and SLES11 SP1 x86-64. Thx in advance...
|
more than likely the file would be
/boot/grub/grub.conf, /boot/grub/grub.cfg or /boot/grub/menu.lst the section you are looking for would look something approximately like Code:
title Fedora (2.6.38.8-35.fc15.x86_64) you would simply add Code:
mem=nn[KMG] if there are more than one sections like that (more than one kernel) i would recommend adding that to ALL of them you must be root to edit the file, when you are done editing the file, simply save it and reboot alternatively you can hit 'e' on the kernel entry at the grub menu to edit the entry, you may have to hold shift during the computer's POST to see the grub menu on modern distributions, add that at the end of the kernel line and then hit whatever button(s) it tells you at the bottom of the screen to boot the machine, this is a temporary way of adding it to the session to test whether or not it works before permanently committing it to the boot loader's configuration (that way if it doesn't work all you have to do is reboot to get rid of the option, if it works, THEN you add it to the configuration file) |
All times are GMT -5. The time now is 02:31 AM. |