17维客“一起快乐” >>所属分类 >> 系统管理   

linux释放内存 编辑词条 发表评论(0)

先看看内存使用状况
[root@web]# free -m
total used free shared buffers cached
Mem: 4043 3979 63 0 171 3662
-/+ buffers/cache: 145 3897
Swap: 5279 0 5279 


把内存里的数据暂时写到硬盘里
[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@web]# free -m
total used free shared buffers cached
Mem: 4043 107 3936 0 1 53
-/+ buffers/cache: 52 3991
Swap: 5279 0 5279 

附件列表


→如果您认为本词条还有待完善,请 编辑词条

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
0

收藏到: Favorites  

词条信息

sjg9999
sjg9999
超级管理员
词条创建者 发短消息   

相关词条