内存 – Linux巨大的页面使用会计
发布时间:2021-05-24 20:17:36 所属栏目:Linux 来源:网络整理
导读:我已经配置了用于 Java的巨大页面,虽然我对/ proc / meminfo中的会计有疑问,但它似乎运行良好.为了显示 # grep HugePages /proc/meminfo AnonHugePages: 274432 kBHugePages_Total: 1008HugePages_Free: 596HugePages_Rsvd: 594HugePages_Surp: 0 我的问题涉
我已经配置了用于 Java的巨大页面,虽然我对/ proc / meminfo中的会计有疑问,但它似乎运行良好.为了显示 # grep HugePages /proc/meminfo AnonHugePages: 274432 kB HugePages_Total: 1008 HugePages_Free: 596 HugePages_Rsvd: 594 HugePages_Surp: 0 我的问题涉及“免费”和“Rsvd”号码 – 为什么它们不加起来总计1008?他们实际上加起来是1190.我在这里不理解什么? 解决方法这是因为HugePages_rsvd基本上是从HugePages_Free中读取的.意思是,在596个免费的大页面中,有594个已被某些应用程序保留使用.那就是内核承诺这些594个大页面可用于该应用程序.如果现在有3个大页面的请求,那么它将失败,因为只有2个可用于保留.将其视为malloc()调用,当您保留内存虚拟页面以考虑进程的VSZ时,但当进程实际使用它们时,它将成为进程的RSZ(运行集). 由于大页面总是驻留在主内存上,当应用程序请求它们时,内核会从空闲池中减少它并增加Rsvd计数器. 这是来自内核源代码. https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt where: HugePages_Total is the size of the pool of huge pages. HugePages_Free is the number of huge pages in the pool that are not yet allocated. HugePages_Rsvd is short for "reserved," and is the number of huge pages for which a commitment to allocate from the pool has been made,but no allocation has yet been made. Reserved huge pages guarantee that an application will be able to allocate a huge page from the pool of huge pages at fault time. HugePages_Surp is short for "surplus," and is the number of huge pages in the pool above the value in /proc/sys/vm/nr_hugepages. The maximum number of surplus huge pages is controlled by /proc/sys/vm/nr_overcommit_hugepages. (编辑:92站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- AIX 5.3(ld-xlc)等效选项Linux(ld-gcc)-rpath
- 企鹅电竞怎么看回播 企鹅电竞在哪看回播方法分享
- Linux Lite 5.8系统正式发布 易用性开始向Windows看齐
- 当curl尝试解析主机时,如何更改php curl超时(curl err_no 6
- linux – 重新排序ELF文件部分的简单方法
- 在linux(centos)系统安装redis教程
- linux – Logrotation – 过早发射的postrotate?
- iphone6s plus快捷功能全解 iphone6s plus快速操作技巧详解
- linux-networking – 在Docker中运行nuttcp时出现分段错误
- 三星S4智能皮套怎么用 三星S4智能皮套开盖自动解锁方法