moto_beats
moto_beats

Reputation: 39

Java Large Pages and Verbose GC Header

We have enabled large pages for use on our JBoss system with these commands:

-XX:+UseLargePages 
-XX:LargePageSizeInBytes=2m

And we have allocated pages at the OS level and provided permissions for JBoss to use the pages. Everything looks OK except for the Verbose GC log header showing a 4k page size.

Memory: **4k page**, physical 12802068k(7370652k free), swap 4194296k(4194296k free)

I would expect this line to read "2m page" to match our large page size as defined in the JAVA_OPTS and at the OS level, but maybe the Java heap doesn't "see" the large pages or maybe the GC log header is not sensitive to these changes (e.g. this output checks the page size for the system, not necessarily the pages in use by Java, in this case large pages of 2m (hopefully)).

Does anyone know if I should be expecting this header to change with the use of large pages?

Upvotes: 2

Views: 717

Answers (1)

vsminkov
vsminkov

Reputation: 11260

GC log is not related to large pages and prints normal-sized page size os::vm_page_size() which is equal to getconf PAGE_SIZE (4kB for x86).

In order to verify that everything is ok you can check output of

java -XX:+UseLargePages \
     -XX:LargePageSizeInBytes=2m \
     -XX:+PrintFlagsFinal -version \
    | grep LargePage

Upvotes: 1

Related Questions