内存泄漏后topfree的小思考

范照兵是谁的秘书
represented by SwapCached (thus the total page cache size is Cached + SwapCached). Linux performs all file I/O through the page cache. Writes are implemented as simply marking as dirty the corresponding pages in the page cache; the flusher threads then periodically write back to disk any dirty pages. Reads are implemented by returning the data from the page cache; if the data is not yet in the cache, it is first
水葫芦喊冤
populated. On a modern Linux system, Cached can easily be several gigabytes. It will shrink only in
response to memory pressure. The system will purge the page cache along with swapping data out to disk to make available more memory as needed.
Buffers are in-memory block I/O buffers. They are relatively short-lived. Prior to Linux kernel version 2.4, Linux had separate page and buffer caches. Since 2.4, the page and buffer cache are unified and Buffers is raw disk blocks not represented in the page cache—i.e., not file data. The Buffers metric is thus of minimal importance. On most systems, Buffers is often only tens of megabytes.
cache相对来讲重⼀些, linux中IO都是基于cache完成的, ⾯对memory压⼒, page cache的size会⼤幅下降. 之前的应⽤中也确实有重IO.⽽buffer的单位block,他是作为桥接page cache和kernel的通道, buffer通常mb为单位,相对来讲没那么重
used没有什么歧义,就是程序所⽤内存, 但是free和available memory就不⼀样了, free可以理解为飘逸在系统之外的内存, available是真正可⽤的内存. ⼀般情况下直接靠buf/cache + free计算不太准确, 因为不是所有的buf/cache都可以释放.这⼏个名词的关系如下
腐蚀疲劳那么如何看内存状况⽐较糟糕呢
available memory接近0, swap剧烈抖动, 这时候buf/cache稳定(系统所⽤之必须),往往伴随着吞吐下降, 性能崩盘.
这⾥⼜详细解释为啥buf/cache + free计算不科学的, /proc/meminfo: provide estimated available memory
msn explorer
天下钱塘代码中增加了available memory来衡量相对精确的可⽤内存
>纳米氧化铋

本文发布于:2024-09-25 08:22:03,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/231483.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:代码   内存   下降   系统   歧义   性能   吞吐
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议