You can set the flag to use large pages like this:
Large pages is a technique to remove some work from the processors TLB caches. They are used to speed up the time to translate virtual to physical memory addresses. Most architectures support multiple page sizes, often with a base page size of 4 KB. For heavy-memory consuming applications it makes sense to have the memory mapped with a larger page granularity to increase the chance of a hit in the TLB. On x86-64, 2 MB and 1 GB pages can be used for this purpose and for memory intense workloads this can have a really big impact.
JVM is system-dependent, by default, the JVM will use the environments default large page size when trying to reserve large pages.
TODO link LargePageSizeInBytes
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.
Edit your Comment