[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Machine not freeing Cached Memory?



On Fri, 2002-04-26 at 12:54, Paul Sargent wrote:
> Hi There,     
> As you can see, it's a 3G physical RAM box. Currently it's sitting there
> with 885MB of Memory labeled as Cache, but if I run a process which requires
> lots of memory, then the system seems to prefer swapping, rather than
> freeing up the cache memory. For example...
	     
> Yes, some 40MB of cache gets freed, but it's mainly (300MB) of swap that
> gets used. This tends to slow down processes before they need to.
> 
> Anyone got any ideas?

The Linux VM prefers to swap stuff out, instead of clearing the cache.
Lot's of stuff can safely be swapped out, and using some (in this case
800M) of cache can speed things up more then swapping out useless data
slow's it down.

The cache will clear when more memory is needed, and peaces of memory
that are accessed often would otherwise be swapped.

So don't worry... it's normal behaviour... (the 40 MB that was swapped
was probably unaccessed for some long time... If it would be accessed
often the kernel would have reduced the cache.)

-- 
Mark Janssen  Unix / Linux, Open-Source and Internet Consultant @
SyConOS IT
E-mail: mark(at)markjanssen.nl / maniac(at)maniac.nl  GnuPG Key Id:
357D2178
hosts: Maniac.nl Unix-God.Net|Org MarkJanssen.com|net|org|nl
SyConOS.com|nl

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: