|
linux: /etc/rc.d # vmstat
procs ----------- memory ---------- --- swap-- ----- io ---- -system-- ----- cpu- -----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 2.59854 million 00420528014880 00121112019810
This cache is a system from the physical memory allocation, used to make the file system read buffer, in accordance with the Linux instructions when the system memory is tight, this memory is automatically released. Manual release caches approach:
sync; echo 3> / proc / sys / vm / drop_caches
Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.
To free pagecache:
* Echo 1> / proc / sys / vm / drop_caches
To free dentries and inodes:
* Echo 2> / proc / sys / vm / drop_caches
To free pagecache, dentries and inodes:
* Echo 3> / proc / sys / vm / drop_caches
As this is a non-destructive operation, and dirty objects are notfreeable, the user should run "sync" first in order to make sure allcached objects are freed.
This tunable was added in 2.6.16. |
|
|
|