Requests the OpenJ9 VM to allocate the Java™ object heap by using large page sizes.
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
AIX®, Linux®, macOS®, and Windows™:
See Using -X command-line options for more information about the
The large page size that you require.
If the operating system does not have sufficient resources to satisfy the request, the page size you requested might not be available when the VM starts up. By default, the VM starts and the Java object heap is allocated by using a different platform-defined page size. Alternatively, you can use the
warnsuboptions to customize behavior.
Default page sizes
On Linux systems, the default size for the object heap depends on the architecture:
- Linux on x86 and AMD64/EM64T systems: 2 MB large pages
- Linux on IBM Z®: 1 MB large pages
- On other architectures, the VM uses the default operating system page size.
On macOS, the default page size is 4 KB.
strictcauses an error message to be generated if large pages are requested but cannot be obtained. This option causes the VM to end.
warncauses a warning message to be generated if large pages are requested but cannot be obtained. This option allows the VM to continue.
Note: If both
On z/OS systems, defines the type of memory to allocate for the Java object heap.
1 MB pageable large pages, when available, are the default size for the object heap.
64-bit VMs support large page sizes of 1 MB nonpageable and 2 GB nonpageable with the following requirements:
- 2 GB nonpageable sizes are supported only on IBM zEnterprise EC12 processors or later.
- A system programmer must configure z/OS for nonpageable large pages.
- Users who require large pages must be authorized to the IARRSM.LRGPAGES resource in the RACF FACILITY class with read authority.
31-bit VMs support a large page size of only 1 MB pageable.
A page size of 4 KB can also be used.
- z/OS: To allocate 1 GB of real memory by using 1 MB nonpageable pages when the VM starts, set the following options:
-Xmx1023m -Xms512m -Xlp:objectheap:pagesize=1M,nonpageable
- z/OS: To allocate 1 GB of real memory by using 2 GB nonpageable pages, set the following options:
-Xmx1023m -Xms512m -Xlp:objectheap:pagesize=2G,nonpageable
In this example the heap is allocated on a 2 GB large page. Even though the object heap is only 1 GB, 2 GB of memory are consumed and the large page is never paged out while the VM is running.