Configuring HugePages on Linux
Complete the following steps to configure HugePages on the computer:
-
Edit the
memlock
setting in the/etc/security/limits.conf
file. Thememlock
setting is specified in KB and set slightly lesser than the installed RAM. For example, if you have 64GB RAM installed, add the following entries to increase the max locked memory limit:* soft memlock 60397977 * hard memlock 60397977
You can also set the
memlock
value higher than your SGA requirements. -
Login as the
oracle
user again and run theulimit -l
command to verify the newmemlock
setting:$ ulimit -l 60397977
-
Run the following command to display the value of
Hugepagesize
variable:$ grep Hugepagesize /proc/meminfo
-
Complete the following procedure to create a script that computes recommended values for
hugepages
configuration for the current shared memory segments:Note:
Following is an example that may require modifications.-
Create a text file named
hugepages_settings.sh
. -
Add the following content in the file:
#!/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. # 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'}` # Start from 1 pages to be on the safe side and guarantee 1 free HugePage NUM_PG=1 # Cumulative number of pages required to handle the running shared memory segments for SEG_BYTES in `ipcs -m | awk {'print $5'} | 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 # Finish with results case $KERN in '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" ;; *) echo "Unrecognized kernel version $KERN. Exiting." ;; esac # End
-
Run the following command to change the permission of the file:
$ chmod +x hugepages_settings.sh
-
-
Run the
hugepages_settings.sh
script to compute the values forhugepages
configuration:$ ./hugepages_settings.sh
-
Set the following kernel parameter:
# sysctl -w vm.nr_hugepages=value_displayed_in_step_5
-
To make the value of the parameter available for every time you restart the computer, edit the
/etc/sysctl.conf
file and add the following entry:vm.nr_hugepages=value_displayed_in_step_5
-
Restart the server.
Note:
To check the availablehugepages
, run the following command:$ grep Huge /proc/meminfo
相关推荐
在虚拟机上安装redhat linux5.5全步骤
安装软件仓库的程序完整步骤小白学linux必备安装软件仓库的程序完整步骤小白学linux必备
oracle10g在redhat上的安装步骤oracle10g在redhat上的安装步骤
我自己总结的ffmpeg在redhat Linux上的完整安装步骤,包括各种解码器的安装和各种解码器的下载网址链接,从网上查了很多资料总结的,相信有了它,不需要再查资料就可以安装成功。
Linux RedHat 下安装MYSQL步骤
从U盘安装RedHat Linux的具体步骤.docx
RedHat_Linux_5.1_安装步骤详解(详细带图)
里面详细的说明了redhat 的安装步骤。有图片说明
VMware虚拟机RedHat联网实施步骤参考.pdf
VMware虚拟机RedHat联网实施步骤
对服务器进行安全加固时会遇到升级openssh的情况。“RedHat Linux主机升级openssh步骤”本人亲自收集整理,有效可行。
vmware下redhat linux9 的详细安装步骤
详细介绍了Linux下yum命令,yum源安装的详细过程,很好的帮助开发人员,熟悉了解yum命令,正确安装yum本地源
RedHat Linux9.0安装和配置步骤有兴趣的可以看看
vmware与redhat linux 7.3安装过程和步骤,描述比较详细且步骤比较清晰……方便理解
redhat syslog 配置 笔记 介绍syslog.conf的配置文件格式和配置实例
步骤十分清晰,细致,适合一初学者用,希望对感兴趣的同学有用!
redhat5 ASMlib软件包+安装步骤,内含kernel、oracleasm、oracleasmlib、oracleasm-support及安装步骤
RedHat安装WebLogic11g软件及Web工程的部署 介绍Linux RedHat下安装weblogic11g的详细步骤
超详细的操作步骤, 在Redhat linux 7.5版本中安装 mysql 5.6版本的数据库. 1 卸载已有mysql, 使用yum(附带yum源的设置步骤)安装依赖 2 下载mysql 5.6文件 3 上传文件到linux 4 安装rpm包 5 设置可远程连接 6 ...