在Exadata上为11.2.0.3 RAC配置Huge Page
1、如想设置SGA仅使用HugePage类型内存则设置:
Alter system set use_large_pages=ONLY scope=spfile;
否则可以保留use_large_pages=TRUE
2、 shutdown数据库实例
3、echo “vm.nr_hugepages=42000” >> /etc/sysctl.conf
4、sysctl -w vm.nr_hugepages=42000
5、grep Huge /proc/meminfo
如果grep Huge /proc/meminfo看到HugePages_Total不为42000,则需要重启OS才能使之生效
6、启动数据库实例
7、grep Huge /proc/meminfo
If the setting of nr_hugepages is not effective, you will need to reboot the server to make HugePages allocation during system startup.
[root@mac02db02 onecommand]# dcli -g dbs_group -l “root” “egrep ‘HugePages_Free|HugePages_Total’ /proc/meminfo”
mac02db01: HugePages_Total: 42000
mac02db01: HugePages_Free: 29743
mac02db02: HugePages_Total: 42000
mac02db02: HugePages_Free: 35698
mac02db03: HugePages_Total: 42000
mac02db03: HugePages_Free: 35614
mac02db04: HugePages_Total: 42000
mac02db04: HugePages_Free: 35646
[root@mac02db02 onecommand]# dcli -g dbs_group -l “root” “grep ‘hugepage’ /etc/sysctl.conf| grep -v \#”
mac02db01: vm.nr_hugepages= 42000
mac02db02: vm.nr_hugepages= 42000
mac02db03: vm.nr_hugepages=42000
mac02db04: vm.nr_hugepages= 42000
show parameter db_name
col value for a10
col name for a20
select inst_id,NAME,VALUE from gv$parameter where name=’use_large_pages’;
SQL> show parameter instance_name
NAME TYPE VALUE
———————————— ———– ——————————
instance_name string macdb2
select inst_id,NAME,VALUE from gv$parameter where name=’use_large_pages’;
1* select inst_id,NAME,VALUE from gv$parameter where name=’use_large_pages’
SQL> /
INST_ID NAME VALUE
———- ——————– ———-
2 use_large_pages ONLY
1 use_large_pages ONLY
4 use_large_pages ONLY
3 use_large_pages ONLY
SQL> SQL> col value for a10
SQL> select inst_id,NAME,VALUE from gv$parameter where name=’use_large_pages’;
INST_ID NAME VALUE
———- ——————– ———-
1 use_large_pages ONLY
2 use_large_pages ONLY
4 use_large_pages ONLY
3 use_large_pages ONLY
Leave a Reply