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

Find the username password from the file
cat /hsphere/shared/apache/htdocs/horde/config/conf.php

Go to mysql shell and run (replace the user name and pass which is in your conf

file.)
mysql> GRANT ALL PRIVILEGES ON horde.* TO horde@’localhost’ IDENTIFIED BY

‘password’;