linux中内存被占用内存,linux 系统,内存被莫名占用

编程入门 行业动态 更新时间:2024-10-11 09:30:12

linux中<a href=https://www.elefans.com/category/jswz/34/1771154.html style=内存被占用内存,linux 系统,内存被莫名占用"/>

linux中内存被占用内存,linux 系统,内存被莫名占用

linux 系统,内存被莫名占用

问题:

在服务器上top ,查看发现应用程序并没有占用多少内存,而free -m 时,剩余的很少,cache的占了一大部分

操作:

1.通过命令 more /proc/meminfo

2.执行命令,释放 cache空间

清理说明:

Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

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 notfreeable, the user should run "sync" first in order to make sure allcached objects are freed.

This tunable was added in 2.6.16.

echo 1 > /proc/sys/vm/drop_caches

更多推荐

linux中内存被占用内存,linux 系统,内存被莫名占用

本文发布于:2024-03-08 13:33:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1721025.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内存   系统   linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!