[20170516]11G use_large_pages参数2.txt
//前面我提到如果设置use_large_pages=auto.设置页面大小不足时,oracle会oradism经常修改内核参数vm.nr_hugepages.
//忘记测试是否在退出后可以收回.链接如下:
http://blog.itpub.net/267265/viewspace-2135210/
--//不知道什么回事,以前写的,忘记发了,补上.
1.环境
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> show parameter use_large_pages
NAME TYPE VALUE
---------------- -------- ------
use_large_pages string AUTO
--//重启数据库设置vm.nr_hugepages=100.执行sysctl -p.
# cat /proc/meminfo | grep -i page
AnonPages: 63312 kB
PageTables: 2808 kB
AnonHugePages: 0 kB
HugePages_Total: 100
HugePages_Free: 100
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
2.启动数据库:
SYS@book> startup
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
Database opened.
--//alert日志:
Tue May 16 15:37:05 2017
Adjusting the default value of parameter parallel_max_servers
from 480 to 120 due to the value of parameter processes (150)
Starting ORACLE instance (normal)
Specified value of sga_max_size is too small, bumping to 637534208
DISM started, OS id=42323
************************ Large Pages Information *******************
Parameter use_large_pages = AUTO
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
Time taken to allocate Large Pages = 0.015872 sec
********************************************************************
--//上次我提到建立进程42323,启动oradism修改内核参数.
# ps -p 42323 -l
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
4 S 0 42323 1 0 80 0 - 3338 pipe_w ? 00:00:00 oradism
$ ls -l $(which oradism)
-rwsr-x--- 1 root oinstall 71790 2013-08-24 10:51:02 /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oradism
--//oradism具有root属主.
# cat /proc/meminfo | grep -i page
AnonPages: 157020 kB
PageTables: 11964 kB
AnonHugePages: 0 kB
HugePages_Total: 305
HugePages_Free: 99
HugePages_Rsvd: 99
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//使用305.原来设置100不足.
3.测试关闭后是否会回收.
SYS@book> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
# cat /proc/meminfo | grep -i page
AnonPages: 74060 kB
PageTables: 3856 kB
AnonHugePages: 0 kB
HugePages_Total: 305
HugePages_Free: 305
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//可以发现不会回收.
# sysctl -p
# cat /proc/meminfo | grep -i page
AnonPages: 73816 kB
PageTables: 3420 kB
AnonHugePages: 0 kB
HugePages_Total: 100
HugePages_Free: 100
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//如果关闭数据库时能回收就好了.