[20170927]關於hugepages.txt--//今天測試hugepages與內核參數nr_overcommit_hugepages,才發現HugePages_Surp表示什麼?--// [20170209]理解pre_page_sga參數.txt => http://blog.itpub. ...
[20170927]關於hugepages.txt
--//今天測試hugepages與內核參數nr_overcommit_hugepages,才發現HugePages_Surp表示什麼?
--// [20170209]理解pre_page_sga參數.txt => http://blog.itpub.net/267265/viewspace-2145481/
--// 0927hugepages與nr_overcommit_hugepages =>http://blog.itpub.net/267265/viewspace-2145481/
--//裡面提到:
$ cat /proc/meminfo | grep -i page
AnonPages: 173732 kB
PageTables: 11052 kB
AnonHugePages: 38912 kB
HugePages_Total: 600
HugePages_Free: 393
HugePages_Rsvd: 98
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//alert記憶體如下:
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 51 GB
Total Shared Global Region in Large Pages = 610 MB (100%)
Large Pages used by this instance: 305 (610 MB)
Large Pages unused system wide = 295 (590 MB)
Large Pages configured system wide = 600 (1200 MB)
Large Page size = 2048 KB
********************************************************************
--實際上現在使用600-393=207.
--HugePages_Rsvd: 98
--207+98=305 正好對上. 換一句化將現在還有98頁面塊沒有使用.僅僅使用207塊.
--HugePages_Total-HugePages_Free+HugePages_Rsvd 就是 目前實例需要的頁面數量.
--//註:這裡看到的HugePages_Surp: 0.
--//而在如下鏈接測試中:http://blog.itpub.net/267265/viewspace-2145481/
--//修改/etc/sysctl.conf
vm.nr_hugepages = 105
vm.nr_overcommit_hugepages=1000
--//啟動資料庫看到如下:
Starting ORACLE instance (normal)
Specified value of sga_max_size is too small, bumping to 637534208
************************ Large Pages Information *******************
Parameter use_large_pages = ONLY
Per process system memlock (soft) limit = 51 GB
Total Shared Global Region in Large Pages = 610 MB (100%)
Large Pages used by this instance: 305 (610 MB)
Large Pages unused system wide = 0 (0 KB)
Large Pages configured system wide = 305 (610 MB)
Large Page size = 2048 KB
********************************************************************
# cat /proc/meminfo | grep -i hugepage
AnonHugePages: 0 kB
HugePages_Total: 305
HugePages_Free: 97
HugePages_Rsvd: 97
HugePages_Surp: 200
Hugepagesize: 2048 kB
--//我配置vm.nr_hugepages = 105,也就是還需要借用200.才能達到305. 這個就是HugePages_Surp的意思.
--//我查了一下字典,估計surp是surpass的縮寫,表示超越, 勝過的意思.
--//我這樣設置HugePages_Free=HugePages_Rsvd.
HugePages_Free: 97
HugePages_Rsvd: 97