metalink: 401749.1 #!/bin/bash # # hugepages_settings.sh # # Linux bash script to compute values for the # recommended HugePages/HugeTLB configuration # on Oracle Linux # # 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 on Oracle Linux. Before proceeding with the execution please note following: * For ASM instance, it needs to configure ASMM instead of AMM. * The 'pga_aggregate_target' is outside the SGA and you should accommodate this while calculating SGA size. * In case you changes the DB SGA size, as the new SGA will not fit in the previous HugePages configuration, it had better disable the whole HugePages, start the DB with new SGA size and run the script again. And make sure that: * Oracle Database instance(s) are up and running * Oracle Database 11g Automatic Memory Management (AMM) is not setup (See Doc ID 749851.1) * The shared memory segments can be listed by command: # ipcs -m Press Enter to proceed..." read # Check for the kernel version KERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'` # Find out the HugePage size HPG_SZ=`grep Hugepagesize /proc/meminfo | awk '{print $2}'` if [ -z "$HPG_SZ" ];then echo "The hugepages may not be supported in the system where the script is being executed." exit 1 fi # Initialize the counter NUM_PG=0 # Cumulative number of pages required to handle the running shared memory segments for SEG_BYTES in `ipcs -m | cut -c44-300 | awk '{print $1}' | grep "[0-9][0-9]*"` do MIN_PG=`echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q` if [ $MIN_PG -gt 0 ]; then NUM_PG=`echo "$NUM_PG+$MIN_PG+1" | bc -q` fi done RES_BYTES=`echo "$NUM_PG * $HPG_SZ * 1024" | bc -q` # An SGA less than 100MB does not make sense # Bail out if that is the case if [ $RES_BYTES -lt 100000000 ]; then echo "***********" echo "** ERROR **" echo "***********" echo "Sorry! There are not enough total of shared memory segments allocated for HugePages configuration. HugePages can only be used for shared memory segments that you can list by command: # ipcs -m of a size that can match an Oracle Database SGA. Please make sure that: * Oracle Database instance is up and running * Oracle Database 11g Automatic Memory Management (AMM) is not configured" exit 1 fi # Finish with results case $KERN in '2.2') echo "Kernel version $KERN is not supported. Exiting." ;; '2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`; echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;; '2.6') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;; '3.8') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;; '3.10') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;; '4.1') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;; esac # End
oracle大页
来源:这里教程网
时间:2026-03-03 12:15:44
作者:
编辑推荐:
- oracle大页03-03
- 怎么将word字体无限放大03-03
- 怎么给word安装字体03-03
- 怎么用滑动方式进入word文档03-03
- 论HPUX系统交换与伪交换03-03
- Oracle 11g 重新创建控制文件03-03
- 怎么把word字体拉长03-03
- 变与不变: Undo构造一致性读的例外情况03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- 变与不变: Undo构造一致性读的例外情况
变与不变: Undo构造一致性读的例外情况
26-03-03 - 删除UNDO表空间并处理ORA-01548问题
删除UNDO表空间并处理ORA-01548问题
26-03-03 - Oracle二号人物将出任谷歌云CEO,或首拿AWS开刀!
Oracle二号人物将出任谷歌云CEO,或首拿AWS开刀!
26-03-03 - Oracle 程序员吐槽:永远不会再为 Oracle 工作了 !
Oracle 程序员吐槽:永远不会再为 Oracle 工作了 !
26-03-03 - Debian strings命令详解(从二进制文件中提取可读文本的实用指南)
- Linuxwwwwjs777netPHPWindows13094391112
- SQL优化案例-单表分页语句的优化(八)
SQL优化案例-单表分页语句的优化(八)
26-03-03 - Linux下执行数据泵expdp和impdp命令,字符转义案例两则
Linux下执行数据泵expdp和impdp命令,字符转义案例两则
26-03-03 - [20181120]toad看真实的执行计划.txt
[20181120]toad看真实的执行计划.txt
26-03-03 - 沃趣微讲堂 | Oracle集群技术(四):集群初始化资源层
沃趣微讲堂 | Oracle集群技术(四):集群初始化资源层
26-03-03
