Re: Question about free/used memory on Linux

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ravinandan Arakali (rarakali) <rarakali@...>
Cc: Linux Kernel <linux-kernel@...>
Date: Sunday, October 21, 2007 - 3:00 pm

Ravinandan Arakali (rarakali) wrote:

pagecache pages may be the reason for the confusion.  Most free memory can
be consumed under 'Cached' in /proc/meminfo

Most of this memory is easily reclaimable and can be considered 'free'.
However the cost of reclaim increases if the pages are memory mapped and/or
dirty.

Cached-Mapped-Dirty in /proc/meminfo can be seen as a easily freeable
memory and can be added to the 'Free' in /proc/meminfo count

What is your intention of finding free memory in the system?  Linux kernel
takes the best decision of using available RAM for file cache or
applications code/data as and when needed.  Ideally the 'Free' count will
be  a very low value on a heavily used system.  If application needs more
memory, then the kernel will shrink the caches and give the reclaimed
memory to the application.


Pages used from tmpfs should come under Mapped or Cached.  They are not
counted as free.


RSS is from each process point of view.  If the page is present in RAM, it
is counted.  If the pages is shared, then it is counted in both process
address space.


Yes, all of them parse /proc/meminfo

--Vaidy
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Question about free/used memory on Linux, Ravinandan Arakali (rarakali)..., (Sun Oct 21, 1:54 pm)
Re: Question about free/used memory on Linux, Pádraig Brady, (Mon Oct 22, 6:05 am)
RE: Question about free/used memory on Linux, Ravinandan Arakali (rarakali)..., (Mon Oct 22, 9:58 pm)
Re: Question about free/used memory on Linux, Vaidyanathan Srinivasan, (Sun Oct 21, 3:00 pm)
RE: Question about free/used memory on Linux, Ravinandan Arakali (rarakali)..., (Sun Oct 21, 4:21 pm)
RE: Question about free/used memory on Linux, linux-os (Dick Johnson), (Mon Oct 22, 1:34 pm)
Re: Question about free/used memory on Linux, Helge Hafting, (Mon Oct 22, 7:51 am)
Re: Question about free/used memory on Linux, Vaidyanathan Srinivasan, (Mon Oct 22, 1:50 am)
RE: Question about free/used memory on Linux, Ravinandan Arakali (rarakali)..., (Wed Nov 14, 2:14 am)
Re: Question about free/used memory on Linux, Pádraig Brady, (Wed Nov 14, 7:58 am)
RE: Question about free/used memory on Linux, Ravinandan Arakali (rarakali)..., (Wed Nov 14, 2:18 pm)
RE: Question about free/used memory on Linux, Ravinandan Arakali (rarakali)..., (Mon Oct 22, 2:28 am)