-
配置
HugePages
1.
确认是否配置了
HugePages
grep Huge /proc/meminfo
如果没有配置,那么除了
AnonHugePages
和
Hugepagesize
外,其他参数的值应该为
0
一下是没
有配置
HugePages
时的命令执行结果:
HugePages_Total:
0
HugePages_Free:
0
HugePages_Rsvd:
0
HugePages_Surp:
0
Hugepagesize:
2048 kB
2.
oracle
用户的
memlock
值(单位是
kb)
ulimit -l
memloc
k
的值应该比实际安装的物理内存小,在
unix
上,可以用下令查询物理内存
[oracle@caissadb ~]$$ cat /proc/meminfo
|grep MemTotal
MemTotal:
65929208 kB
3. <
/p>
如果当前的
memlock
的值没有设置
,那请
root
用户登录,修改
cat
/etc/security/
配置文件,已
KB
为单位这是
memlock
的限值,
KB
单位不需要输入
*
soft
memlock
50000000
*
hard
memlock
50000000
至于
memlock
的值应该比物理内存小多少,参考下列表格
< br>数据库服务器内存
(GB
)
memlock
取值
64
32
16
还可以将
memlock
这只
unlimited
,但是我们不推荐这样做
4.
重新用
oracle
用户登录,确认
memlock
的值生效
ulimit
-l
5.
因为
AMM
与
HugePages<
/p>
不兼容,所以要确认
AMM
特性已经关闭
,在
11G
中默认是开启的,通过以下初始化
< br>参数复位(将其设置
0
)来禁用
AMM
memory_max_target
big integer 0
memory_target
big integer 0
60397977
30198988
15099494
以此类推
如果使
spfile
,并且这些参数
的当前值是非零值,用一下命令将其复位(值为
0
)
aler system reset
memory_target
scope=spfile
alter system reset memory_max_target
scope=spfile
p>
如果这些参数的值没有被显示的设置(即当前值
0
< br>),就不需要将他们复位了,如果这是在执行尚明的命令会
报错,
ora-32010
6.
确认
ASMM
< br>已经被启用,检查下面的参数已经这只为非零
sga_target
sga_max_size
7 <
/p>
如果数据库是
11.2.0.2
以上版本
,设置初始化参数
use_large_pages
=only
,
确保只有
sga
从
< br>HugePages
获
得所有内存后数据库实例才能启动
,
这样可以避免内存不足的错误,
此设置仅适合数据库实例,<
/p>
对应
ASM
实例,
请保持
use_large_pages=TRUE (
默认
值
)
。
这样设置的效果是如果能用到<
/p>
HugePages
就尽量用,
如果不能
满足
使用
HugePages
时,
p>
ASM
也能启动。
如果使用
spfile
用以下命令设
置
use_large_pages=ONLY,
重启数据库<
/p>
alter system set
use_large_pages=ONLY scope=spfile;
注意目前
在
oracle
文档中并未介绍
use
_large_pages
参数,
使用
DBCA
创建数据库时也不能设置这个参数,
更多
信息参见
MOS ID 1392497.1
8
以
root
用户
编辑
/
etc/,
将内核参数
_hugepages
的值设置为
hugepages_
返回
的值,这个脚本在
MOS
ID 401749.1
内容如下
Applies to:
Linux OS -
Version Oracle Linux 4.4 to Oracle Linux 6.6
[Release OL4U4 to OL6U6]
Oracle
Database - Enterprise Edition
Generic
Linux
Purpose
==============
==================================================
==============================
This script is intended to compute
values for the recommended HugePages/HugeTLB
configuration
for the current shared
memory segments.
It 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.
For general
information about HugePages / HugeTLB, please see
Note 361323.1
=========================
=======================================
==================================
Requirements
Oracle Database instance(s) are up and
running
Oracle Database 11g
Automatic Memory Management (AMM) is not setup
(See Note 749851.1)
The shared memory segments can be
listed by command
=====================
===========================================
=======================================
Configuring
================
================================================
p>
=====================================
Create a text file named hugepages_
Copy the contents below in the file
Run:
$$ chmod +x
hugepages_
============================
====================================
===
=========================
Instructions
Be sure that all
applications that are meant to use HugePage /
HugeTLB are running at the time
the
script is to be run. This includes the Oracle
RDBMS instances and ASM instances in addition to
other applications.
Be
sure that you have /bin and /usr/bin in $$PATH
Run:
$$ ./hugepages_
=======================================
=========================
==============
=====================
Caution
This sample code is provided for
educational purposes only, and is not supported by
Oracle Support.
It has been tested
internally, however, we do not guarantee that it
will work for you. Ensure that you
run
it in your test environment before using.
Script
#!/bin/bash
#
# hugepages_
#
# 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
-
-
-
-
-
-
-
-
-
上一篇:2021年高中会考英语试题 含答案
下一篇:概念与概念框架