Clear RAM Memory Cache, Buffer and Swap Space on Linux

From Knowledge Center
Revision as of 01:37, 29 October 2018 by Ruan (talk | contribs) (Created page with "Clear PageCache only: <pre> $ sync; echo 1 > /proc/sys/vm/drop_caches </pre> Clear dentries and inodes: <pre> $ sync; echo 2 > /proc/sys/vm/drop_caches </pre> Clear PageCa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Clear PageCache only:

$ sync; echo 1 > /proc/sys/vm/drop_caches

Clear dentries and inodes:

$ sync; echo 2 > /proc/sys/vm/drop_caches

Clear PageCache, dentries and inodes:

$ sync; echo 3 > /proc/sys/vm/drop_caches