Operating System - Linux
1827808 Members
13671 Online
109969 Solutions
New Discussion

Re: Need assistance on interpreting memory usage data

 
SOLVED
Go to solution
Debbie Fleith
Regular Advisor

Need assistance on interpreting memory usage data

Can someone give me more information about how to interpret how much memory I have un-used/available for applications on my Linux server?

"top" shows this (and appears that I don't have much free memory left):

Mem: 2055236k av, 2031852k used, 23384k free

"free" shows this:
total used free shared buffers cached
Mem: 2055236 2032884 22352 0 206704 1531700
-/+ buffers/cache: 294480 1760756
Swap: 4096532 0 4096532


2 REPLIES 2
Ivan Ferreira
Honored Contributor
Solution

Re: Need assistance on interpreting memory usage data

Normal, please see:

https://www.redhat.com/advice/tips/meminfo.html

Linux will always try to use all available memory, if not for applications, for buffers/cache.

From the output of free command, you can see how much memory is used as buffers/cache. So the memory used by your application is what you see in +/- buffers/cache.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Mike Stroyan
Honored Contributor

Re: Need assistance on interpreting memory usage data

One surprise to watch out for is that shared memory and tmpfs files are reported as part of the "Cached" total in /proc/meminfo and top. That can make it seem that there is a lot of pagecache in use and easily freed when much of that memory is actually shared memory or tmpfs files that would need to be swapped out to release their RAM. You can see the amount of system V shared memory in RAM using "ipcs -u". There is no easy way to see the amount of tmpfs RAM. The total amount in RAM and swap can be seeing looking at the output of "df".