Oracle 参数 USE_LARGE_PAGES 官方解释,作用,如何配置最优化建议
本站中文解释
USE_LARGE_PAGES参数用来控制是否使用大页(大页是物理内存中的一种特殊分类,比普通分页大很多)来管理SGA内存空间,如果设置为TRUE,则SGA中部分内存将用大页来管理,大页能够提供较少的系统开销,降低缓存模式下对页表的开销,一般情况下,Oracle集群系统会使用大页,而独立的Oracle数据库服务器则不会。
正确设置USE_LARGE_PAGES参数的步骤如下:
1、在操作系统提供的设置工具中设置大页,确保大页可以使用;
2、设置USE_LARGE_PAGES参数的值为TRUE,确认更改生效。
3、使用诊断工具检查大页设置是否正确,将错误信息记录下来,以便之后及时处理;
4、重启Oracle服务器,确认large page参数已生效;
5、使用查询语句检查系统是否正确使用large page,如果仍存在大页设置无效的情况,可以尝试在操作系统层面重新设置看看是否有用。
官方英文解释
USE_LARGE_PAGES
is used to manage the database’s use of large pages for SGA memory.
Note:
This parameter is applicable only on the Linux operating system. However, setting this parameter to FALSE
can cause performance degradation on any platform.
Property | Description |
---|---|
Parameter type |
String |
Syntax |
|
Default value |
|
Modifiable |
No |
Modifiable in a PDB |
No |
Basic |
No |
Oracle RAC |
Multiple instances can use different values |
This parameter does not affect process-private memory allocations.
Values
These values can be specified for USE_LARGE_PAGES
:
-
TRUE
Specifies that the instance can use large pages if large pages are configured on the system.
In Oracle Database 11g Release 2 (11.2.0.2), if there are not enough large pages configured on the system, then regular sized pages will be used to allocate SGA memory. This can cause the free large pages to go unused, and the operating system can allocate a huge amount of memory to create page tables to map SGA into physical pages for the Oracle processes. This may lead to
ORA-04030
errors and severe performance degradation on an instance.In Oracle Database 11g Release 2 (11.2.0.3) and later releases, Oracle allocates as much of the SGA as it can in large pages, and if it runs out, it will allocate the rest of the SGA using regular sized pages. This can cause the instance to create additional shared memory segments for the SGA, but the total SGA size will be unchanged. In this supported mixed page mode allocation, the database will exhaust the available large pages before switching to regular sized pages.
-
FALSE
Specifies that the instance will not use large pages. This setting is not recommended because it can cause severe performance degradation for the instance. Although the
USE_LARGE_PAGES
initialization parameter applies only to Linux systems, setting this parameter toFALSE
can cause performance degradation on any platform. -
AUTO
Specifies that, during startup, the instance will calculate and request the number of large pages it requires. If the operating system cannot fulfill this request, then the instance will start with a combination of large and regular pages.
-
ONLY
Specifies that the instance will fail to start if large pages cannot be used for the entire SGA memory. Oracle recommends this setting for consistent performance.
-
AUTO_ONLY
This setting is available starting with Oracle Database 19c and it is the default setting for Exadata systems. It specifies that, during startup, the instance will calculate and request the number of large pages it requires. If the operating system can fulfill this request, then the instance will start successfully. If the operating system cannot fulfill this request, then the instance will fail to start. This ensures that no instances will run with under-provisioned large pages.
Note:
USE_LARGE_PAGES
is set to FALSE
automatically in an Oracle ASM instance when MEMORY_TARGET
is enabled. In this case, the FALSE
setting does not cause performance degradation.