/proc/meminfo 中的条目
我可以理解 /proc/meminfo 中包含的大部分信息,例如总内存、缓冲区、缓存等。您能告诉我下面列出的不太明显的信息是什么意思吗?
- AnonPages
- Mapped
- Slab
- NFS_Unstable
- Bounce
- VmallocTotal
- VmallocUsed
- VmallocChunk
如果有人想知道,我正在谈论 linux 命令 cat /proc/meminfo 的输出
I can make sense of most of the information contained in /proc/meminfo like total memory, buffers, cache etc. Could you tell me what do the less obvious ones like the ones listed below mean?
- AnonPages
- Mapped
- Slab
- NFS_Unstable
- Bounce
- VmallocTotal
- VmallocUsed
- VmallocChunk
If anyone is wondering, I am talking about the output of the linux command cat /proc/meminfo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的理解如下。
我同意这些数字很难理解并且显示出不一致的值。
内存总计
但是最近内核的 vmallocused 值可能是错误的。
这是因为它计算 VM_xxx 区域,例如 VM_IOREMAP、VM_MAP...,而不是 VM_ALLOC 区域。
VM_IOREMAP 区域可以映射内存,该内存可以在内核之外
内存管理,所以上面的公式可能不精确,或者完全错误。
你可以这样做:
if(vma->flags & VM_ALLOC)
活动 + 不活动
AnonPages
虽然我无法匹配这些数字。 请参阅此处 如果您有任何线索,请帮助我。
总页面缓存
Slab
My understanding is as follows.
And I agree these numbers are hard to understand and showing inconsistent values.
MemTotal
But recent kernel's vmallocused value could be wrong.
This is because it counts VM_xxx regions like VM_IOREMAP, VM_MAP,... other than VM_ALLOC area.
VM_IOREMAP region can be mapping memory which can be outside of kernel's
memory management, so the formula above can be not precise, or completely wrong.
You can either do:
if(vma->flags & VM_ALLOC)
Active + Inactive
AnonPages
Although I haven't been able to match these numbers. See here and help me if you have any clue.
Total PageCache
Slab
来自 RedHat
From RedHat
此信息的规范来源是 /usr/src/linux/Documentation/filesystems/proc.txt。 具体来说,
The canonical source of this information is /usr/src/linux/Documentation/filesystems/proc.txt. Specifically,