How to Release Cache Memory In Linux
Linux OS has memory management system used to clear the buffer cache periodically but You can manually free up the memory cache with the following command:
There are three options available to flush cache memory. Use one of below as per your requirements.
Clear pagecache only use below command:
# sync; echo 1 > /proc/sys/vm/drop_caches
Clear dentries and inodes use below command
# sync; echo 2 > /proc/sys/vm/drop_caches
Clear pagecache, dentries ,buffer and inodes use below command
# sync; echo 3 > /proc/sys/vm/drop_caches
Follow the below steps to clear cache Memory and verify
To Check the Memory status:
#free -m
Using Top command #top
Run Below command to clear Cache Memory.
# sync; echo 3 > /proc/sys/vm/drop_caches
Now check and verify #free -m and #top command
#free -m result
#top result
There are three options available to flush cache memory. Use one of below as per your requirements.
Clear pagecache only use below command:
# sync; echo 1 > /proc/sys/vm/drop_caches
Clear dentries and inodes use below command
# sync; echo 2 > /proc/sys/vm/drop_caches
Clear pagecache, dentries ,buffer and inodes use below command
# sync; echo 3 > /proc/sys/vm/drop_caches
Follow the below steps to clear cache Memory and verify
To Check the Memory status:
#free -m
Using Top command #top
Run Below command to clear Cache Memory.
# sync; echo 3 > /proc/sys/vm/drop_caches
Now check and verify #free -m and #top command
#free -m result
#top result
How to Release Cache Memory In Linux
Reviewed by TecGeeks News
on
April 09, 2016
Rating:
No comments: