• Clear Memory Cache on Linux

    You can free up the memory cache on Linux OS by the following :

    sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

    Ex.

    root@s1:~# free -m
                 total       used       free     shared    buffers     cached
    Mem:        323078     319647       3430          0        705     175763
    -/+ buffers/cache:     143178     179899
    Swap:        11583         29      11554
    root@s1:~#  sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
    root@s1:~# free -m
                 total       used       free     shared    buffers     cached
    Mem:        323078     136639     186438          0          6         59
    -/+ buffers/cache:     136573     186504
    Swap:        11583         29      11554
    root@s1:~# 
    
    
    

     

     

    Categories: Linux

    Comments are currently closed.