释放linux cached使用内存的方法
free-up-cache-memory-in-linux
# free
total used free shared buffers cached
Mem: 4037464 3953104 84360 0 169812 2696660
-/+ buffers/cache: 1086632 2950832
Swap: 6094840 96 6094744
#
Free the cache memory by issuing this command
sync ; echo 3 > /proc/sys/vm/drop_caches
then checked as below :
# free
total used free shared buffers cached
Mem: 4037464 983772 3053692 0 2488 36728
-/+ buffers/cache: 944556 3092908
Swap: 6094840 96 6094744
备注:
# /proc/sys/vm/drop_caches (since Linux 2.6.16)
# To free pagecache, use echo 1 > /proc/sys/vm/drop_caches
# To free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches
# To free pagecache, dentries and inodes, use echo 3 > /proc/sys/vm/drop_caches
阅读(1083) | 评论(1) | 转发(0) |