oracle 中的大页问题
今天巡检数据库的时候,发现有一个备库节点上的负载很大。这个备库基本无人使用。仅做延时查询使用,按理来说不应该有这么大负载,
环境说明 11.2.0.4 单节点dg库。
问题 大页不生效。且数据库所在服务器负载极大
top - 09:33:00 up 326 days, 19 min, 3 users, load average: 17.69, 11.65, 5.83 --负载说明
Tasks: 357 total, 1 running, 356 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.3%sy, 0.0%ni, 68.4%id, 31.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 65970692k total, 64774768k used, 1195924k free, 6992k buffers
Swap: 33054712k total, 5563048k used, 27491664k free, 399336k cached
179 root 20 0 0 0 0 D 0.3 0.0 517:34.66 kswapd0
查询当前大页大小:
grep HugePages /proc/meminfo
AnonHugePages: 0 kB
HugePages_Total: 9960
HugePages_Free: 9960
HugePages_Rsvd: 0
HugePages_Surp: 0
数据库中sga大小
SQL> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 31G
sga_target big integer 31G
看到这里问题有点明朗了,好像是数据库没有使用大页导致的。满心欢喜的去查询了一下大页修改的方法。
根据如下 shell脚本跑出了一个修改值。
#!/bin/bash
#
# hugepages_settings.sh
#
# Linux bash script to compute values for the
# recommended HugePages/HugeTLB configuration
#
# Note: This script does calculation for all shared memory
# segments available when the script is run, no matter it
# is an Oracle RDBMS shared memory segment or not.
#
# This script is provided by Doc ID 401749.1 from My Oracle Support
# http://support.oracle.com
# Welcome text
echo "
This script is provided by Doc ID 401749.1 from My Oracle Support
(http://support.oracle.com) where it is intended to compute values for
the recommended HugePages/HugeTLB configuration for the current shared
memory segments. Before proceeding with the execution please note following:
* For ASM instance, it needs to configure ASMM