[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的缩写,表示超越, 胜过的意思.
--//更正一下:应该是 surplus 过剩, 剩余, 留余额, 公积金
--//我这样设置HugePages_Free=HugePages_Rsvd.
HugePages_Free: 97
HugePages_Rsvd: 97