oracle不使用大页内存(文档 ID 803238.1)
2017-11-07 15:02
351 查看
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.4 to 11.1.0.7 [Release 10.2 to 11.1]Information in this document applies to any platform.
***Checked for Relevance 26-AUG-2014***
SYMPTOMS
-- Problem Statement:Customer states that ORACLE IS NOT UTILIZING HUGEPAGES.
Kernel parameter memlock was checked and set according to:
Note 361468.1 - HugePages on Oracle Linux 64-bit
CAUSE
Causes numbered below:1)
The total size of huge pages of 16384 * 2048 * 1024 = 34359738368 is less than the shared memory
segment requested in the call of shmget.
The value reported in the shmget is a small overhead of 2M above the sga_max_size (34359738368):
(You will need strace or a similar too to see the shmget call. The next cause below shows more detail on this.)
shmget (34361835520) - sga_max_size (34359738368)) = 2097152 bytes = 2048k = 2M
2) Another potential cause is that NUMA is enabled, which is the default on 10.2.0.4 .
You can see evidence of this by the strace output. You may use other tracing tools on other platforms. (ie...truss, tusc) The numbers below DO NOT coincide with the figures above, but are yet another example of what may cause HUGEPAGES to not be utilized
by Oracle.
To troubleshoot this method perform your database needs to be shutdown so that a new "startup" can be issued and traced.
oracle@myhost ~]>strace -f -o output.txt sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 30 16:58:27 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1267044 bytes
Variable Size 142609052 bytes
Database Buffers 134217728 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
SQL>
Then open the output.txt and search for "startup". You should then see a output below here indicating shmget calls:
17283 shmget(2256778204, 4096, 0) = -1 ENOENT (No such file or directory)
17283 shmget(2256778204, 0, 0) = -1 ENOENT (No such file or directory)
17283 shmget(2256778205, 4096, 0) = -1 ENOENT (No such file or directory)
17283 shmget(2256778205, 0, 0) = -1 ENOENT (No such file or directory)
17283 shmget(2256778206, 4096, 0) = -1 ENOENT (No such file or directory)
17283 shmget(2256778206, 0, 0) = -1 ENOENT (No such file or directory)
17283 shmget(2256778207, 4096, 0) = -1 ENOENT (No such file or directory)
17283 shmget(2256778207, 0, 0) = -1 ENOENT (No such file or directory)
You'll notice we see 8 calls to shmget (for almost equally sized blocks) vs 1 for the entire block. The allocation also exceeds your calculations for the number of hugepages at this point resulting in a failed startup. (In the case here the customer was attempting
to configure an SGA of 11GB, but we see much more being allocated by the shmget calls.)
NUMA - the command "numactl --show" will show resource pools on Linux. You may check with your Systems administrator for O/S level commands on other platforms.
Patch 8199533 is available for several platforms and versions of the Oracle Database server.
The patch will disable the default enabled behavior.
Note:
The issue does not occur on 10.2.0.5 as it already has the fix for Bug 8199533 ;hence NUMA is disabled by default.
Other NUMA related issues are documented in:
Note 759565.1 - Oracle NUMA usage recommendation
- OR -
3)
A parameter is set blocking the allocation:
_db_block_cache_protect is set to TRUE
This parameter SHOULD NOT be set unless specifically advised by Support or DEV.
Linux:
mprotect will work on Linux, however, be aware of the following bug for 64-bit systems:
Unpublished Bug 6955340 - _db_block_cache_protect does not work in linux x64
Fixed in 10.2.0.4, 11.1.0.7 and 11.2
SOLUTION
-- To implement the solution, please execute the following steps referencing the Cause Number above:1)
Increase the number of huge pages from 16384 to 16400 and increase the memlock to the new size of 16400 * 2048. (The numbers here were specific to this example. The calculations for the correct value may need to be adjusted and bumped up to allocate correctly.)
2)
If the troubleshooting steps in the Cause 2 (i.e. using strace or another process tracing utility) show you that NUMA is causing this, apply Patch
8199533
3)
If the parameter _db_block_cache_protect is set to TRUE and you are not under direct advisement from Support or DEV please disable, i.e. set it to FALSE.
相关文章推荐
- 使用 Diagwait 作为诊断工具,获取用于诊断 Oracle Clusterware 节点驱逐的更多信息 (文档 ID 1525761.1)
- windows 2003 x32中 设置oracle SGA内存使用大于1.7的方法--PAE
- 使用SPA/GPA 参数--SAP内存参数设置&SET /GET PARAMTER ID
- 理解Oracle在AIX平台上的内存使用
- oracle中使用序列实现id自增
- 理解Oracle在AIX平台上的内存使用
- [Oracle PL/SQL]当数据表设计成具有父ID的时候,当需要选择所有与父ID同根生的所有节点的时候,使用的SQL语句
- Oracle 10G 如何使用超过1.7G的内存
- Oracle 10G 如何使用超过1.7G的内存
- 在oracle中插入一条数据,id自动增长,插入之后怎么得到这个id(sequence的使用)
- 检测SOLARIS上的ORACLE PROCESSES的内存使用量
- 关于oracle 使用大内存出现:ORA-27102: out of memory
- 在oracle中插入一条数据,id自动增长,插入之后怎么得到这个id(sequence的使用)
- 让oracle使用大的内存页
- oracle 10g 在 32位 redhat as4.0 上使用8G大内存问题
- ORACLE 使用大内存
- 为什么oracle在AIX有空闲内存的情况下使用SWAP
- oracle如何使用4G以上内存
- 本地使用Oracle帮助文档攻略
- (2007 6月28日)oracle 在不同平台使用大内存