Profile Image

What is Set size of large pages: -XX:LargePageSizeInBytes?

What is Set size of large pages: -XX:LargePageSizeInBytes? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xx-largepagesizeinbytes

  • x-largepagesizeinbytes

  • Set size of large pages

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky



You can specify exactly the size of the Large Pages size with this:


-XX:LargePageSizeInBytes=size, where size is the desired amount of memory which should be set to the size of Large Page, specified in GB/MB/KB




To set the page size to 1GB you can use the following:






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. With larger page sizes we can have a better use of memory resources, but, this may lead to larger space sizes for the PermGen, which consequently can force to reduce the size of Java heap space


Default Value:


JVM is system-dependent, by default, the JVM will use the environments default large page size value.






Arguments related:


TODO link UseLargePages


Related Posts



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.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvm-argument

  • xx-largepagesizeinbytes

  • x-largepagesizeinbytes

  • Set size of large pages