LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   High Memory Utilization (https://www.linuxquestions.org/questions/linux-server-73/high-memory-utilization-903818/)

devUnix 09-19-2011 06:26 AM

High Memory Utilization
 
Hi,


There are some production servers for LDAP (OpenLDAP) that we have in place. I see that Memory (RAM) utilization remains constantly above 90% on all of them. We also have had alerts stating high time being taken for LDAP Authentication.

I also find that Swap utilization at the same time is very nominal or not at all.

So, how do we measure and determine that a certain level shows an "optimum usage" of Memory / RAM and beyond which an investigation is required?

Any guidelines for specifying these levels of alerting/monitoring:

Load Average or CPU Utilization:
Memory / RAM Utilization
Swap Memory Utilization
and other such essential or critical aspects from the monitoring / alerting and administrating point of view?

johnsfine 09-19-2011 06:53 AM

That sounds like the typical misunderstanding of Linux ram stats, which the following page was written to explain

http://www.linuxatemyram.com/

Quote:

Originally Posted by devUnix (Post 4475907)
how do we measure and determine that a certain level shows an "optimum usage" of Memory / RAM and beyond which an investigation is required?

That depends too much on how you use the system and how much swap space you provided and many other factors.

In your current situation, I expect free+buffers+cache is a large fraction of total ram. If that is true then there is no memory pressure worth worrying about.

The low swap utilization also indicates lack of memory pressure, but a high swap utilization doesn't necessarily indicate significant memory pressure. What matters with swap is how often pages are read back in.

When free+buffers+cache adds up to less than 30% of total ram and there is significant use of swap space, it becomes harder to determine whether that indicates real memory pressure.

16pide 09-19-2011 07:33 AM

to check the amount of RAM is really available now, run this:
Code:

free -m
in my case, here is what I get:
Code:

georges@w520:~$ free -m
            total      used      free    shared    buffers    cached
Mem:        11997      11875        121          0        240      7300
-/+ buffers/cache:      4334      7662
Swap:        1905          1      1904

and that means I have 7662 MB of RAM available

Now to diagnose your performance problem, you can use those commands:
Code:

top
iotop

iotop will tell you which processes are making most disk IOs
There are other tools, but I would start with those two

And also, you should check your DNS resolution on that machine. Many machines are set to use a dns server that is unreachable, and then lots of network transactions take an additional 5 seconds because the machine waits for a timeout of its reverse DNS request.
please post the result of
Code:

cat /etc/resolv.conf
and also tell us if when you ssh into that server it takes 5 extra seconds before you get the shell prompt.

devUnix 09-19-2011 10:21 AM

Quote:

Originally Posted by 16pide (Post 4475969)
And also, you should check your DNS resolution on that machine. Many machines are set to use a dns server that is unreachable, and then lots of network transactions take an additional 5 seconds because the machine waits for a timeout of its reverse DNS request.

please post the result of

Code:

cat /etc/resolv.conf
and also tell us if when you ssh into that server it takes 5 extra seconds before you get the shell prompt.

iotop - is new to me. I just came to know it when you mentioned it. The other ones: free and top - I use them extensively. :)


All times are GMT -5. The time now is 01:16 AM.