-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce counts when class of method is not in SCC #18356
Conversation
By default, OpenJ9 uses an "implicit" shared class cache (SCC) that is used to cache "bootstrap" classes and methods. Currently, methods whose class is not present in the SCC receive a high initial invocation count (3000/3000 for loopless/loopy method) in order to improve steady state throughput. However, this could affect start-up time of applications because methods are interpreted for too long before being JIT compiled. The presence of `-Xshareclasses` on the command line is a sign that the user cares about start-up time and OpenJ9 automatically lowers the invocations counts to 1000/250. However, with the implicit SCC (no -Xshareclasses command line option), application classes are not cached and methods belonging to those classes will receive a large initial invocation count (3000/3000). Since application classes are likely important, we would like to use lower counts even when the implict SCC is used. This commit lowers the initial invocation counts for methods whose class is not in SCC under the following conditions: - SCC is used. Rationale: -Xshareclasses:none may be a sign that user does not care about start-up that much. - -Xtune:throughput is not used. Rationale: this option is a clear signal that the user cares more about throughput than startup. - The user has not provided a specific count on the command line. - The JVM is in start-up mode. Rationale: this feature only seeks to improve start-up time. - The JVM runs on 4 or more vCPUs. Rationale: lower counts will generate more compilations which will compete with application Depends on eclipse/omr/eclipse-openj9#7156 Signed-off-by: Marius <[email protected]>
d78038c
to
4049925
Compare
jenkins test sanity zlinuxjit jdk17 depends eclipse-omr/omr#7156 |
What is your thinking on applying lower counts during rampup phase ? i.e. in addition to startup phase. |
I don't think lowering counts during rampup will improve DaCapo further. DaCapo benchmarks don't have a startup phase per-se, so the JIT estimates one, which is quite long. |
Okay I wasn't thinking so much about Dacapo alone, though obviously it is a relevant fact if lower counts during rampup might help there too. I understand the point about rampup essentially being "too late". I'll defer to your best judgement on the JIT startup vs VM startup question since I don't have a good feel about that. Either way, please let me know if/when there are to be no further changes, so that I know when to consider final review and merge. |
I don't plan to do any changes at the moment so this PR can be delivered as is. |
PR eclipse-openj9#18356 introduced a change to reduce the counts of a method whose class is not in the shared class cache (SCC), if SCC is enabled and the load of that class happens during start-up. This change improves performance of some short running benchmarks from the DaCapo suite (when run with default options), but was discovered to also cause a small (2-3%) throughput regression when running the Daytrader benchmark on top of tWAS. This commit restricts the change from PR eclipse-openj9#18356 to environments that use an implicit SCC (by default, OpenJ9 creates an implict SCC that is only allowed to to store bootstrap classes). Signed-off-by: Marius Pirvu <[email protected]>
By default, OpenJ9 uses an "implicit" shared class cache (SCC) that is used to cache "bootstrap" classes and methods. Currently, methods whose class is not present in the SCC receive a high initial invocation count (3000/3000 for loopless/loopy method) in order to improve steady state throughput. However, this could affect start-up time of applications because methods are interpreted for too long before being JIT compiled.
The presence of
-Xshareclasses
on the command line is a sign that the user cares about start-up time and OpenJ9 automatically lowers the invocations counts to 1000/250. However, with the implicit SCC (no -Xshareclasses command line option), application classes are not cached and methods belonging to those classes will receive a large initial invocation count (3000/3000). Since application classes are likely important, we would like to use lower counts even when the implict SCC is used.This commit lowers the initial invocation counts for methods whose class is not in SCC under the following conditions:
Depends on eclipse/omr/#7156