本文へスキップ

메모리 캐쉬 삭제

MintState 2011年1月28日 1:40 閲覧 18810

리눅스에 메모리가 꽉차 캐쉬를 지우고 싶을때 리부팅하지 않고 캐쉬를 지울수 있다.

우선 메모리 확인 -m은 메가바이트 단위로 보여준다.
# free -m

[Attach]592[/Attach]

그럼 캐쉬 삭제는 echo 명령어를 사용하면 된다.
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 not freeable, the user should run "sync" first in order to make sure all cached objects are freed.

添付ファイル

  • 14KB
共有 X Facebook LINE QR コード

コメント 0 件

最初のコメントを書いてみましょう。