Limit RAM Usages


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Limit RAM Usages
# 1  
Old 04-24-2012
Limit RAM Usages

Is there any kernel tune parameters available to limit RAM usages at certain level .
Code:
EG .
RAM: 4 GB
Swap: 2 GB

I Need if my RAM usages reached 3 GB Kernel will start swaping new pages . ..


--Shirish Shukla
# 2  
Old 04-24-2012
Why do you need this?
# 3  
Old 04-24-2012
I suppose you could use the badram module, and tell it that vast swaths of memory are bad...

I can't see the use of this except for testing purposes, to see what happens when you start swapping...
# 4  
Old 04-24-2012
Linux: Tuning Swappiness | KernelTrap might shed some light on it.
# 5  
Old 04-25-2012
Yes Corona...
We have a test lab RHEL6 with 4GB RAM and have about 3GB of Swap .. that will be soon go for development phase .. before we want to test the functionality by creating high load and swap usages and test the same with monitoring tools and tuned parameters .

Thanks for your valuable inputs ..

--Shirish Shukla
# 6  
Old 04-26-2012
Shirish,

For test purposes, the easiest way to effectively reduce the amount of physical RAM available for use by processes is to crank up the kernel parameter vm.min_free_kbytes. This sets the low water mark for the amount of memory held as free for new processes and is normally set to something like 50MB. Turning this up to 3.5GB in your example will mean the system will run out of physical memory and start actively paging very quickly. See the man pages for sysctl and sysctl.conf.

This parameter is also very useful for effectively eliminating cache and buffer space when testing I/O throughput.

Of course, the whole point of designing a system configuration is to ensure that the system would only ever actively page as an absolute last resort, one small step better than crashing. Systems should NEVER actively page in normal operation. Disk I/O (milliseconds) is literally a million times slower than RAM operations (nanoseconds), so system performance will immediately become completely unacceptable as soon as the system starts to actively page.

Active paging (shown by "sar -B" or "vmstat") is completely different from swap space usage (shown by "sar -S" or "free"). It's OK for a system to statically park pages of memory for long inactive processes on the swap partition. But, if the system is actively paging, it's reading and writing thousand of blocks to and from swap space per second.

If you even suspect that this system will start actively paging under heavy load, BUY MORE RAM.

Remember to reset vm.min_free_kbytes to the original value when your tests are complete...

Last edited by sds9985; 04-26-2012 at 01:34 AM..
This User Gave Thanks to sds9985 For This Post:
# 7  
Old 04-26-2012
Thanks for clearing this . can you pls let me confirm ..

Code:
 
RAM: 1GB
Swap: 2GB
Kernel: 2.6.3
 
AND 
# cat /proc/sys/vm/min_free_kbytes
3794

So what basis this calculated and am missing logic behind same ..some docx state that it's number of pages of physical RAM available .

What logic used to calculate this value .. ??
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Cybersecurity

Limit CPU and RAM utilization for new user in RedHat

We have a system with 4 Xeon Processors each with 10 cores, total 512 GB RAM and 10 TB Hard Drive. we want to create multiple user accounts with different resource limitations as : User 1: RAM : 50GB, PROCESSOR: 10 Cores , User folder in home directory of 10GB space. User 2: RAM :... (5 Replies)
Discussion started by: vaibhavvsk
5 Replies

2. Shell Programming and Scripting

help me for Perl script for tool usages

Hi, How to do Perl script for floating license usages metric. Anyone help me out this issue? Regards, Ram. (0 Replies)
Discussion started by: ramanthan
0 Replies

3. Red Hat

Physical RAM

Hi, I have a server (BL460c) with 32G of physical RAM. It currently only uses approx 5% its capacity but will use more (not sure how much more) pending the launch of further applications. If I need to build another node of similar functionality should I consider downgrading the physical... (2 Replies)
Discussion started by: Duffs22
2 Replies

4. Solaris

Limit: stacksize: Can't remove limit

Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine? Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies

5. Solaris

How get memory and cpu usages of user's processes?

I have the processes (100+) by the oracle id and I'd to get the summarized view of the oracle processes' usage of the memory and the cpu. top would give me some, but not all. Thanks (3 Replies)
Discussion started by: iwmi
3 Replies

6. AIX

[AIX] usages of lint for .cpp file?

Hi , I Want to apply AIX lint to my source code which all are *.cpp/*.h >lint test.cpp lint: 1286-332 File test.cpp must have a .c, .C or .ln extension. It is ignored. lint: 1286-334 There are no files to process. I am getting above error. -Ashok (3 Replies)
Discussion started by: ashokd001
3 Replies

7. Red Hat

red hat Linux 5.0 is detecting 3gb ram but physical ram is 16gb

Hi, On server 64bit Hw Arch , Linux 5.0(32bit) is installed it is showing only 3gb of ram though physical is 16gb can u give me idea why? (4 Replies)
Discussion started by: manoj.solaris
4 Replies

8. Linux

Built in ram limit for 64 bit

Hey all, I have been thinking about getting a new computer, and the motherboard I am looking at is capable of holding up to 8 Gb of ram. Now it appears as though for 32 bit linux, in order to use more than 4 Gb of ram, you had to enable a certain option in the kernel, but if I remember... (2 Replies)
Discussion started by: kermit
2 Replies

9. Solaris

Usages of Array's (Important please)

;) Hi friends, any one please help me. I want to store some job names into an array and also I want extract these names on different timings for scheduling. Please give me some idea. your's loving LOVE :p (1 Reply)
Discussion started by: Love
1 Replies

10. Programming

getting RAM size

Sir, How can i get the RAM size .Is there is any predefined function ..Howsir??? Thanks In advance, ArunKumar (6 Replies)
Discussion started by: arunkumar_mca
6 Replies
Login or Register to Ask a Question