Oracle Linux: 如何计算HugePages保留的内存 (Doc ID 2546416.1)

Oracle Linux: How To Calculate The Memory Reserved By HugePages (Doc ID 2546416.1)

APPLIES TO:

Linux OS - Version Oracle Linux 6.0 and later
Linux x86
Linux x86-64

GOAL

 Calculate the percentage of memory reserved by Huge Pages.  计算Huge Pages保留的内存百分比

SOLUTION

  1. Inspect the memory parameters:  检查内存参数
     

    # cat /proc/meminfo
    MemTotal: 98721456 kB 
    MemFree: 1277612 kB
    MemAvailable: 12186676 kB
    Buffers: 20496 kB
    Cached: 11013124 kB
    SwapCached: 4820 kB
    Active: 2303780 kB
    Inactive: 9716992 kB
    Active(anon): 716672 kB
    Inactive(anon): 582092 kB
    Active(file): 1587108 kB
    Inactive(file): 9134900 kB
    Unevictable: 0 kB
    Mlocked: 0 kB
    SwapTotal: 33554428 kB
    SwapFree: 32965424 kB
    Dirty: 16856 kB
    Writeback: 0 kB
    AnonPages: 1004112 kB
    Mapped: 308188 kB
    Shmem: 290944 kB
    Slab: 694100 kB
    SReclaimable: 602280 kB
    SUnreclaim: 91820 kB
    KernelStack: 13792 kB
    PageTables: 75736 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 40956756 kB
    Committed_AS: 3011596 kB
    VmallocTotal: 34359738367 kB
    VmallocUsed: 256480 kB
    VmallocChunk: 34359477292 kB
    HardwareCorrupted: 0 kB
    AnonHugePages: 0 kB
    CmaTotal: 0 kB
    CmaFree: 0 kB
    HugePages_Total: 40975 
    HugePages_Free: 35867
    HugePages_Rsvd: 13
    HugePages_Surp: 0
    Hugepagesize: 2048 kB 
    DirectMap4k: 163840 kB
    DirectMap2M: 14516224 kB
    DirectMap1G: 87031808 kB

      
  2. Calculate the percentage of memory used by HugePages:  计算HugePages使用的内存百分比
     

    memory% = (HugePages_Total * Hugepagesize) / MemTotal * 100.0

      

    Use the values appropriate for your system, taken from the /proc/meminfo report.  For example, from the example above:
    使用适用于您系统的值,该值取自/proc/meminfo报告。例如,从上面的示例:
    memory% = (HugePages_Total * Hugepagesize) / MemTotal * 100.0 
    memory% = (40975 * 2048) / 98721456 * 100.0
    memory% = 83916800 / 98721456 * 100.0
    memory% = 85.04
      
    The HugePages configuration reserves about 85% of the physical memory on the server.
    HugePages配置了服务器上大约85%的物理内存
    Note that all values in /proc/meminfo use the same units, so no conversion is necessary. 请注意,/ proc / meminfo中的所有值都使用相同的单位,因此无需进行转换。

REFERENCES

NOTE:1919605.1 - SRDC - Troubleshooting Oracle VM Server 3.x And Later Using The VMPinfo3 Diagnostic Capture Tool
NOTE:1998077.1 - Automated Troubleshooting Process

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值