To take advantage of large pages, the amount of physical memory must be greater than the amount of System Global Area (SGA) specified in the parameter file.
Large pages might not be allocated always during instance startup. Large pages are supported in 2 modes:
Regular mode: All of the SGA is attempted to be allocated in large pages. If the required amount of large pages are not available, then the instance does not come up.
Mixed mode: All of the SGA is attempted to be allocated in large pages. If no more large pages are available, then the subsequent allocations are done using regular pages. So the SGA allocation can be a mixed set of large pages and regular pages.
The mixed mode also supports a time parameter (in
msecs). If a large page allocation took more time than the msecs specified by this time parameter, then subsequent allocations are made using regular pages. This parameter is helpful when the database startup time might be too long due to the entire SGA being allocated using large pages.
In regular mode, large page usage locks the entire SGA into physical memory. Physical memory is not released during a shrink operation. In mixed mode, only the large pages from the SGA are locked in physical memory, not released during a shrink operation and regular pages remain pageable.
Your operating system documentation for restrictions on allocating large pages
To enable large page support:
- Go to the directory
- Open the
oracle.keyin a text editor and record the value found. It is set by Oracle Universal Installer. The default is:
- Start Registry Editor at the command prompt:
Although Registry Editor lets you view and modify registry keys and parameter values, you usually are not required to do so. In fact, you can render your system useless if you make incorrect changes. Therefore, only advanced users must edit the registry. Back up your system before making any changes in the registry.
oracle.keyfile must not be modified or removed. Oracle binaries open it to determine the location in the registry where their variables are stored.
- Go to the
Locate the key corresponding to the value found in the
oracle.keyfile. In the default case, for example, locate:
- Create one of the following, depending on where you want to enable large page support:
ORA_LPENABLEto enable large page support on all instances. Its value decides the mode of large pages for all Oracle database instances on the computer.
_LPENABLEto enable large page support on a specific instance. Its value decides the mode of large pages for the specific database instance.
Set the value of the above registry entry to
1for regular mode and
2for mixed mode.
The time parameter for mixed mode is optional. To specify this time parameter which is instance specific, create
_LPMAXTIMEand set the value to the desired number of millisecs.
When this time parameter is specified for an instance and the large pages allocation takes more than the specified millisecs, then the rest of the SGA is allocated using regular pages.
- Exit Registry Editor.
By default, Oracle allocates the minimum available large page size when using large pages. The minimum available large page size, 16 MB, is obtained by using the
Do not set the initialization parameter
lock_sga when large pages are enabled. Large page usage locks the entire SGA into physical memory. When used with the parameter
lock_sga, database startup fails with an error because the operating system automatically locks. That is, it prevents memory from being paged to disk when large pages are requested. Physical memory is not released during a shrink operation.