Oracle-hugepages_settings.sh
来源:互联网 发布:怎么看自己淘宝等级 编辑:程序博客网 时间:2024/05/22 06:33
#!/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 textecho "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 -mPress Enter to proceed..."read# Check for the kernel versionKERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'`# Find out the HugePage sizeHPG_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 1fi# Initialize the counterNUM_PG=0# Cumulative number of pages required to handle the running shared memory segmentsfor 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` fidoneRES_BYTES=`echo "$NUM_PG * $HPG_SZ * 1024" | bc -q`# An SGA less than 100MB does not make sense# Bail out if that is the caseif [ $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 -mof 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 1fi# Finish with resultscase $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
0 0
- Oracle-hugepages_settings.sh
- oracle配置hugepages_settings.sh
- hugepages_settings.sh
- oracle load.sh 导入文本
- Oracle 修复脚本runfixup.sh
- sh 脚本备份oracle metadata
- sh
- oracle快速启动关闭sh程序
- ORACLE入门之逻辑备份SH文件
- Oracle逻辑备份的SH文件
- sh+crontab实现oracle自动备份
- 重装oracle后没有orainstRoot.sh
- 【ORACLE RAC】root.sh原理,ocr管理
- 重装oracle后没有orainstRoot.sh
- Oracle安装需要脚本orainstRoot.sh
- ORACLE常用命令总结-ORACLE逻辑备份的SH文件
- troubleshooting root.sh problem for oracle 10g/11g
- Solaris11配置Oracle RAC ASMDisk 以及运行root.sh注意事项
- centos 6.x sftp配置
- 登录页面密码显示隐藏功能
- 将一个字符串逆序
- ijkplayer阅读学习笔记之从代码上看播放流程
- Android 抽屉效果的导航菜单实现
- Oracle-hugepages_settings.sh
- windows编译g2o图优化框架(vs2010)
- Jpanel下的键盘事件
- poj 2367 Genealogical tree 拓扑排序 解题报告
- android development tips
- 关于socket通信的理解,socket连接通过IP+端口号的方式,那么如果两个服务器端的应用在同一台机器上,并且位于同一个tomcat容器下,那么岂不是两个服务器都收到了客户端发送的信息
- Canvas+Paint绘制路径,文字与图形
- vmstat
- 开启我的JAVA之旅