drop linux memory cache

Posted: October 26, 2010 in linux

Hi all,

I recently found one tips to flush out unused memory to free up more memory.

when you see below out put from;

[root@test riyas]# free -m
total       used       free     shared    buffers     cached
Mem:          3990       3181        809          0        448       2228
-/+ buffers/cache:        503       3486
Swap:         9452          0       9452
[root@wapgw2 cdrs]#

just do the following to free out cache . This will flush out pagecache, dentries and inodes

echo 3 > /proc/sys/vm/drop_caches

NOTE: THis will only support Kernels 2.6.16 and newer.

Riyas
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s