Wednesday 5 March 2014

How to Release Cache Memory In Linux


To check uses of Cache Memory

free -m

rahul@rahul-laptop:~# free -m
             total       used       free     shared    buffers     cached
Mem:           992        898         94          0         14        460
-/+ buffers/cache:        604        388
Swap:         1011        132        879

To Release/ Free  Cache Memory 

rahul@rahul-laptop:~# sync, echo 3 > /proc/sys/vm/drop_caches 

Above command will free used cache memory
 to verify run again free -m

     OR 

rahul@rahul-laptop:~# sync && echo 1 > /proc/sys/vm/drop_caches