Programming/Linux

리눅스에서 Memory 정리하기

라우드니스 2014. 4. 10. 19:23

리눅스에서 Memory 정리하기

많은 작업을 수행하다보면 메모리가 회수(?)되지 않는 상황이 생긴다. 
이럴 때 다음 명령을 수행하여 회수를 할 수 있다.

[이 전]
[root@jpnips tmp]$ free
total used free shared buffers cached
Mem: 32932100 25916432 7015668 0 1535684 22394696
-/+ buffers/cache: 1986052 30946048
Swap: 65537156 532 65536624

[root@jpnips ~]# sync;echo 3 > /proc/sys/vm/drop_caches

[이 후]
[root@jpnips ~]# free
total used free shared buffers cached
Mem: 32932100 4894320 28037780 0 1392 4331752
-/+ buffers/cache: 561176 32370924
Swap: 65537156 532 65536624


출처: http://toofasttosee.blogspot.kr/2011/04/memory.html

반응형