eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.27k stars 721 forks source link

Use LDR_CNTRL in AIX to use 64KB page sizes. #19052

Open rmnattas opened 6 months ago

rmnattas commented 6 months ago

We can improve performance on AIX by setting LDR_CNTRL to use 64KB pages by default.

LDR_CNTRL=TEXTPSIZE=64K@DATAPSIZE=64K@STACKPSIZE=64K@SHMPSIZE=64K

This is proposed to OpenJDK https://bugs.openjdk.org/browse/JDK-8252802 but rejected.

rmnattas commented 6 months ago

@pshipton @zl-wang

pshipton commented 6 months ago

https://bugs.openjdk.org/browse/JDK-8252802 wasn't committed. The status is withdrawn, and the PR https://github.com/openjdk/jdk/pull/17906#issuecomment-1953643518 was closed due to that comment.

What testing have we done on this change locally?

rmnattas commented 6 months ago

Tested couple workloads locally and it may have helped somewhat or stayed the same, with not significant impact on memory usage (positive or negative), hence no significant implication. Also pLinux already uses 64KB everywhere by default.

pshipton commented 6 months ago

That doesn't seem like a strong justification to go ahead with the change and the potential risks. Everything forked from the JVM will have the same settings.

zl-wang commented 6 months ago

In the past (java7 time), we set it anyway. It was lost without our knowing when the build was moved to Bangalore. On POWER6/7, it had substantial performance benefit. On newer processor(s), the benefit seemed less (2-3%). No other implications expected. @pshipton

pshipton commented 6 months ago

Pls run internal builds with all the test suites.

pshipton commented 6 months ago

Besides the testing, the change should include an option to control the behavior, so a user or dev can turn it off for diagnostics, if it's causing problems, or the change isn't desired. An example similar option is -XX:[+/-]UseZlibNX. https://github.com/ibmruntimes/openj9-openjdk-jdk/blob/openj9/src/java.base/unix/native/libjli/java_md.c#L390

zl-wang commented 6 months ago

that sounds reasonable. we only set it when -XX:-YYY is not set.