CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit www.eclipse.org/openj9/docs

-Xlp

Requests the OpenJ9 VM to allocate the Java™ object heap and JIT code cache memory with large pages.

Note: This option is deprecated in all versions later than Java 8. Use the -Xlp:codecache and -Xlp:objectheap options instead.

Restriction: This option does not work on macOS®.

If you use the -Xgc:preferredHeapBase option with -Xlp, the preferredHeapBase address must be a multiple of the large page size. If you specify an inaccurate heap base address, the heap is allocated with the default page size.

To find out the large page sizes available and the current setting, use the -verbose:sizes option. Note that the current settings are the requested sizes and not the sizes obtained. For object heap size information, check the -verbose:gc output.

Syntax

    -Xlp[<size>]

See Using -X command-line options for more information about the <size> parameter.

Explanation

AIX®

If <size> is specified, the VM attempts to allocate the JIT code cache memory by using pages of that size. Allocating large pages by using -Xlp is supported only on the 64-bit VM, not the 32-bit VM.

If a size is not specified, this option requests the VM to allocate the Java object heap (the heap from which Java objects are allocated) with large (16 MB) pages.

If large pages are not available, the Java object heap is allocated with the next smaller page size that is supported by the system. AIX requires special configuration to enable large pages.

The VM supports the use of large pages only to back the Java object heap shared memory segments. The VM uses shmget() with the SHM_LGPG and SHM_PIN flags to allocate large pages. The -Xlp option replaces the environment variable IBM_JAVA_LARGE_PAGE_SIZE, which is now ignored if set.

For more information about configuring AIX support for large pages, see Large pages in the AIX product documentation.

Linux®

If <size> is specified, the VM attempts to allocate the JIT code cache memory by using pages of that size. Allocating large pages by using -Xlp is supported only on the 64-bit VM, not the 32-bit VM.

If large pages are not available, the VM does not start and produces an error message. The VM uses shmget() to allocate large pages for the heap. Large pages are supported by systems that have Linux kernels v2.6 or higher.

Note: Linux for IBM Z® supports only a large page size of 1 M.

Depending on the architecture, 1 MB or 2 MB large pages, when available, are the default size for the object heap and the code cache. The options that control these sizes are Xlp:codecache and -Xlp:objectheap.

Windows™

If <size> is specified, the VM attempts to allocate the JIT code cache memory by using pages of that size.

Allocating large pages by using -Xlp is supported only on the 64-bit VM, not the 32-bit VM.

z/OS®

If <size> is specified but unsuccessful, or if executable pages of that size are not supported, 1 M pageable is attempted. If 1 M pageable is not available, the JIT code cache memory is allocated by using the default or smallest available executable page size.

If <size> is not specified, the 1 M nonpageable size is used. If large pages are not supported by the hardware, or enabled in RACF®, the VM does not start and produces an error message.

Allocating large pages by using -Xlp is supported only on the 64-bit VM, not the 31-bit VM. The -Xlp[<size>] option supports only a large page size of 2 G and 1 M (nonpageable).

1 M pageable pages, when available, are the default size for the object heap and the code cache. The options that control these sizes are Xlp:codecache and -Xlp:objectheap.

Specifying -Xlp1M uses a 1 M pageable size for the code cache, when available. Specifying -Xlp2G sets the object heap size, but generates a warning that 2 G nonpageable pages cannot be used for the code cache. Use the -Xlp:objectheap:pagesize=2G,nonpageable option to avoid the warning.

Limitation and workaround

The VM ends if insufficient operating system resources are available to satisfy the request. However, an error message is not issued. There are a number of reasons why the VM cannot honor a large page request. For example, there might be insufficient large pages available on the system at the time of the request. To check whether the -Xlp request was honored, you can review the output from -verbose:gc. Look for the attributes requestedPageSize and pageSize in the -verbose:gc log file. The attribute requestedPageSize contains the value specified by -Xlp. The attribute pageSize is the actual page size used by the VM.

See also