centos系统内存只升不降,内存释放命令 - 电脑知识 - 【三明电脑网】_三明电脑维修_三明笔记本电脑维修_监控安装_市区上门维修

全国统一24小时服务热线:400-0000-000400-0000-000  / 1399000000

当前位置:首页 > 电脑知识 > 正文

centos系统内存只升不降,内存释放命令

发布日期:2018-04-25

摘要:当linux系统出现本文所说的这种内存只升不降的情况时,大家可以试一下在linux终商执行一下以下的这种命令。To free pagecache:echo 1 > proc sys vm drop_...

当linux系统出现本文所说的这种内存只升不降的情况时,大家可以试一下在linux终商执行一下以下的这种命令。

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

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.

上一篇:一键锁定QQ 保护聊天私密

下一篇:win7找出后台运行程序