LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   understanding memory consumption (https://www.linuxquestions.org/questions/linux-newbie-8/understanding-memory-consumption-912767/)

aamerjavaid 11-10-2011 12:40 AM

understanding memory consumption
 
2 Attachment(s)
Hi All,

I am from Database Team, and due to recent performance issues, I want to know more about my linux box (RHEL 4.8 Nahant) memory consumption, the confusion lies in the tools, i used to check memory utilization.

First, i used
Code:

free -m
and the results were that i just have near 400M left on my linux box.

Then, i used linux graphic tool
Code:

System Monitor
, and the results were totally different. and it showed that i am just using near 4G of RAM from my 32G.

I have also uploaded print screens for the both sessions.

Thanks,
Amir

druuna 11-10-2011 02:15 AM

Hi,

I do believe you are incorrectly reading the output of the free command.
Quote:

The disk cache on linux servers use up the majority of total memory which is common and inherent in the kernel. The kernel will always try to utilize most of it. As long as the server isn’t using swap space, there’s shouldn’t be a concern about physical memory. The memory that’s currency being registered as used can be replaced if another program needs it. To get a “true” reading of memory usage, the best thing to look at is the -/+ buffers/cache.
Code:

            total      used      free    shared    buffers    cached
Mem:        32489      32083        405          0      1394      26218
-/+ buffers/cache:      4470      28018
Swap:        32767        83      32684

From an applications point of view you need to look at the bold part (4Gb used and 28Gb free), which is consistent with the GUI output.

Have a look at these links:
- Linux ate my RAM! ("simple")
- Why doesn't free memory go down (bit more in depth)

Hope this helps.

aamerjavaid 11-10-2011 05:52 AM

Hi druuna,

Thanks for your reply, yes, it might be an interpretation issue, now i got it.

Regards,
Amir

druuna 11-10-2011 06:40 AM

You're welcome :)


All times are GMT -5. The time now is 02:50 AM.