Large memory pages
Modern CPUs have a feature named large memory pages. This feature allows applications that require a lot of memory to make 2 to 4 MB-sized allocations instead of the standard 4 KB. Needless to say, this can improve the performance significantly for some applications. It can, however, also cause degraded performance when shortage of memory (that often occurs in systems with long uptime, where memory has become so fragmented that new memory reservations are not allowed) leads to excessive paging.
The large memory pages feature is available in the 64-bit JVM, where the parameter for enabling it is the following one:
-XX:+UseLargePages
By default, large memory pages is disabled in Java on most major platforms (Linux, OS X, and Windows) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access