oracle大頁
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
#
# Welcome text
echo "
This script is provided by Doc ID 401749.1 from My Oracle Support
() 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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2222291/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 標準大頁和透明大頁Oracle
- 【大頁記憶體】Oracle資料庫配置大頁記憶體記憶體Oracle資料庫
- oracle 大頁配置詳細介紹Oracle
- AIX上為ORACLE配置大頁面AIOracle
- LINUX下為ORACLE資料庫設定大頁--hugepageLinuxOracle資料庫
- oracle分頁Oracle
- mysql大頁配置MySql
- oracle 分頁寫法Oracle
- Oracle的特性分頁Oracle
- Oracle 分頁方法研究Oracle
- oracle分頁查詢Oracle
- oracle 分頁問題Oracle
- linux配置大頁HugePagesLinux
- 如何在redhat5為oracle啟用及配置hugepage大頁記憶體RedhatOracle記憶體
- Oracle Rownum分頁改寫Oracle
- mySql\oracle分頁機制MySqlOracle
- Oracle的分頁查詢Oracle
- oracle 線上文件首頁Oracle
- Oracle分頁查詢格式Oracle
- 網頁改版7大要素網頁
- 一篇ORACLE在linux上用大頁記憶體的好文章OracleLinux記憶體
- oracle之 關閉透明大頁Oracle
- Oracle分頁查詢格式(十三)Oracle
- Oracle分頁查詢格式(十二)Oracle
- Oracle分頁查詢格式(十一)Oracle
- Oracle分頁查詢格式(八)Oracle
- Oracle分頁查詢格式(九)Oracle
- Oracle分頁查詢格式(十)Oracle
- oracle分頁查詢語句Oracle
- oracle 分頁優化(stopkey)Oracle優化TopK
- Oracle分頁查詢之order byOracle
- oracle sql分頁查詢(一)OracleSQL
- 大話Oracle nullOracleNull
- centos 開啟大頁記憶體CentOS記憶體
- 七大常用的網頁版式網頁
- AIX下開啟大頁的方法AI
- 記憶體_大頁記憶體記憶體
- openGauss-大頁記憶體記憶體