리눅스에서 캐쉬메모리 지우기??

강대섭   
   조회 10900   추천 0    

안녕하세요.
리눅스에서 캐쉬메모리를 지우고 싶은데 어떻게 해야하나요?
인터넷검색해보니

Drop Caches

Kernels 2.6.16 and newer provide a mechanism to have the kernel drop the page cache and/or inode and dentry caches on command, which can help free up a lot of memory. Now you can throw away that script that allocated a ton of memory just to get rid of the cache...

To use /proc/sys/vm/drop_caches, just echo a number to it.

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!

이런애기는 있는데 잘 안되네요....
리눅스 버전은 CentOS 4.5
커널버전은 2.6.9-55
짧은글 일수록 신중하게.
몽몽 2009-07
현재의 커널버전은 2.6.9-55
지원하는 커널은 Kernels 2.6.16 and newer

최신 커널로 업그레이드하세요.

메모리에 filesystem buffer 캐싱된거면 sync 명령쓰면 됩니다.
권국봉 2009-07
말씀하신 drop_caches 기능은 좀 위험합니다.

일단 기능으로 나와있기는하나 2.6.23 커널에서 파일 시스템에 여러번 문제가 된적이 있습니다.

제가 찾아본 글에 의하면 개발용으로 사용할 수 있지만 운영용으로는 적합하지 않다는 판단이 듭니다.

참고 하세요. ;
정희섭 2009-07
top 에서 cached 로 잡히는거 말씀하시는거면 지우실 필요가 있나 싶네요???


QnA
제목Page 4152/5725
2015-12   1769192   백메가
2014-05   5243831   정은준1
2009-07   5909   양해원
2009-07   6593   스캇
2009-07   6566   보슬비내리…
2009-07   6339   개똥이네
2009-07   8477   정범
2009-07   25210   푸릉이
2009-07   11470   황원석1
2009-07   6622   이상정
2009-07   6645   미수맨
2009-07   8713   김진우
2009-07   6847   굴다리교
2009-07   6427   psj1050
2009-07   6871   방o효o문
2009-07   10123   로그아웃
2009-07   7240   방o효o문
2009-07   9709   병맛폰
2009-07   6135   psj1050
2009-07   6479   김건우
2009-07   5853   로그아웃
2009-07   10195   병맛폰