Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Linux Mint 15 X64, Mageia 2, Red Hat Enterprise, Centos 6.x
Posts: 20
Rep:
memory configuration
Hello ,
I got a question for all of you in the community, i have two servers with 20GB of ram(RHEL AS 4U4) and and a load balancing software, that assign users one machine or the other according to the load of each system.
The problem is that it takes into account the amount of free ram instead of the load of the processors. the 2 servers have in any given time 17 to 19.1GB of ram assigned to cache and buffers; and this causes problems with the load balancing soft. I know that Linux manages the memory cache dynamically.
The question is: Can i set in any part of the system a max limit to the ram assigned to cache, let's say to a max of 60% of the total ram?.
Any advice from you will be very appreciated.
I don't think so. Linux unlike UNIX is designed to do put it all in cache and buffers automatically so it will be more quickly available (theoretically) for processes that need it.
Question is how does your load balance software determine "free" memory? If you issue the Linux free command you see something like:
total used free shared buffers cached
Mem: 255144 231740 23404 0 36824 84856
-/+ buffers/cache: 110060 145084
Swap: 0 0 0
If you could force the load balancing software to use the value for "free" in the line that says "-/+ buffers/cache" then it would be a more realistic load balance.
Distribution: Linux Mint 15 X64, Mageia 2, Red Hat Enterprise, Centos 6.x
Posts: 20
Original Poster
Rep:
I would like to give more info about my systems, the 2 systems that take all the available ram for cache have the kernel 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux.
And we have here other hosts with RHEL AS 3u8 with the kernel 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:30:30 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux and the same load balancing software, and these machines doesn't use all the ram for caching, they leave at least 14GB free of 20GB.
If the 2.4 behaviour is sufficient for you requirements, try looking at swappiness on the 2.6 system. Setting it to 0 (zero) replicates the old behaviour.
Distribution: Linux Mint 15 X64, Mageia 2, Red Hat Enterprise, Centos 6.x
Posts: 20
Original Poster
Rep:
swapiness
Thankyou syg00,
That solved my particular situation, i setup vm.swappiness=0 in sysctl.conf and now these machines are only using about 1.1 GB to 2.0 GB of ram for cache, leaving the rest as free memory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.