`
zhangxiong0301
  • 浏览: 359703 次
社区版块
存档分类
最新评论

redhat设置 huge page步骤

阅读更多

Configuring HugePages on Linux

Complete the following steps to configure HugePages on the computer:

  1. Edit the memlock setting in the /etc/security/limits.conf file. The memlock 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.

  2. Login as the oracle user again and run the ulimit -l command to verify the new memlock setting:

    $ ulimit -l
    60397977
    
  3. Run the following command to display the value of Hugepagesize variable:

    $ grep Hugepagesize /proc/meminfo
    
  4. 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.
    1. Create a text file named hugepages_settings.sh.

    2. 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
      
    3. Run the following command to change the permission of the file:

      $ chmod +x hugepages_settings.sh
      
  5. Run the hugepages_settings.sh script to compute the values for hugepages configuration:

    $ ./hugepages_settings.sh
    
  6. Set the following kernel parameter:

    # sysctl -w vm.nr_hugepages=value_displayed_in_step_5
    
  7. 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
    
  8. Restart the server.

    Note:

    To check the available hugepages, run the following command:
    $ grep Huge /proc/meminfo
分享到:
评论

相关推荐

    RedHat 7.5 Oracle 18c RAC 安装操作手册.pdf

    - 关闭透明大页和NUMA的步骤通常包括编辑Grub配置文件(grub.conf或grub2.cfg)以及修改sysctl参数,如设置transparent_hugepage/enabled为never。 5. Oracle RAC和Oracle Grid Infrastructure安装: - Oracle ...

    (实操)RedHat 7.4安装Oracle12c_RAC.docx

    3. 配置GRUB:需要在GRUB配置文件中添加transparent_hugepage=never以禁用透明大页。 4. 禁用avahi-daemon:avahi-daemon可能会干扰Oracle的安装,因此需要禁用它。 二、安装Grid Infrastructure 1. 安装Grid ...

    Redhat7.3局域网使用ambari安装大数据平台

    通过修改`/etc/rc.local`文件或者直接在命令行中使用`echo never > /sys/kernel/mm/transparent_hugepage/enabled`来关闭THP,以保证系统性能不受影响。 5. SSH免密登录配置 Ambari安装过程及大数据平台的管理依赖...

    Oracle数据库服务器关闭Linux透明大页和开启大页的方法

    - 另外,查看`/sys/kernel/mm/redhat_transparent_hugepage/enabled`文件,如果内容为`[always] madvise never`,且"never"在括号内,表明透明大页已禁用。 2. **关闭透明大页** - Oracle官方推荐关闭THP以避免...

    cloudera manager安装

    1. **透明大页配置**:通过将 `/sys/kernel/mm/transparent_hugepage/defrag` 和 `/sys/kernel/mm/transparent_hugepage/enabled` 设置为 `never` 来禁用透明大页功能。这可以通过在 `/etc/rc.local` 文件中添加相应...

    Oracle 19c RAC on Linux安装手册

    禁用THP可以通过内核参数`transparent_hugepage`进行,确保在启动时设置为`never`或通过命令`echo never > /sys/kernel/mm/transparent_hugepage/enabled`来关闭。开启HugePages则涉及到内核参数的设置,比如`vm.max...

    cdh安装手册

    $> echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag ``` - SUSE 11 SP2: ``` # 在/etc/init.d/after.local中增加一行: if test -f /sys/kernel/mm/transparent_hugepage/enabled; then ...

    linux安装单机版Oracle.doc

    你可以通过查看`/sys/kernel/mm/transparent_hugepage/enabled`来判断THP的状态,将其设置为`never`来禁用THP。同时,你还需要修改`/etc/default/grub`文件,在`GRUB_CMDLINE_LINUX`行添加`transparent_hugepage=...

    CDH 5.x CentOS安装手册(本地oracel存储库).pdf

    echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag ``` #### 安装Cloudera Manager 1. **下载Cloudera Manager RPM包**: - 使用`wget`工具从Cloudera官方仓库下载Cloudera Manager所需的RPM包...

Global site tag (gtag.js) - Google Analytics