-
释放linux系统的内存
2008-05-29 | Tag:linux
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://snowyowls.blogbus.com/logs/21917805.html
今天惊愕地发现,主节点上8G内存被不知道什么进程吃掉了整整6G有余,正常的计算快要维持不下去了,遂处理之。
先看看内存使用状况
[root@node1 ~]# free -m
total used free shared buffers cached
Mem: 8004 6557 1446 0 163 5630
-/+ buffers/cache: 763 7240
Swap: 1983 0 1983把内存里的数据暂时写到硬盘里
[root@node1 ~]# sync
修改 /proc/sys/vm/drop_caches文件
[root@node1 ~]# echo 3 > /proc/sys/vm/drop_caches
[root@node1 ~]# cat /proc/sys/vm/drop_caches再看内存
[root@node1 ~]# free -m
total used free shared buffers cached
Mem: 8004 631 7372 0 0 60
-/+ buffers/cache: 570 7433
Swap: 1983 0 1983终于释放出来了
随机文章:
ubuntu8.10设置双显示器 2008-12-04启动和配置NIS 2008-05-26设置ssh不输密码登陆笔记 2006-05-31谁说猎熊不违法? 2008-01-10北京的照片 2007-04-02
收藏到:Del.icio.us
引用地址:








评论