I’ve been looking for this over and over and over, until I had some inspiration today (thanks to Andew and Chris) .. this has one and only one sole purpose: safekeeping, so I don’t end up searching for it all over again …
To free pagecache:
1 |
# sync; echo 1 > /proc/sys/vm/drop_caches |
To free dentries and inodes:
1 |
# sync; echo 2 > /proc/sys/vm/drop_caches |
To free pagecache, dentries and inodes:
1 |
# sync; echo 3 > /proc/sys/vm/drop_caches |
Once that is done, you’ll see the memory (usually RAM) freeing up.
Any idea how this is done on pre 2.6.16 kernels? The feature was added on 2.6.16.