LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   memory configuration (https://www.linuxquestions.org/questions/red-hat-31/memory-configuration-553926/)

fabmejia 05-14-2007 09:19 PM

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.

Thanks

MensaWater 05-15-2007 01:54 PM

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.

fabmejia 05-15-2007 05:06 PM

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.

Thankyou for your feedback

syg00 05-15-2007 05:15 PM

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.

If you're lucky that might solve this for you.

fabmejia 05-17-2007 11:27 AM

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.

:) :D


All times are GMT -5. The time now is 11:28 PM.