-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add commented out JVM options for G1GC #33685
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
Conversation
These options are available now that we will be supporting G1GC for Java 10 and above. They are also designed so that the CMS options don't have to be commented out in order for the G1 options to take effect.
|
Pinging @elastic/es-core-infra |
|
The benchmarks and results are available at https://writequit.org/org/es/g1gc-testing.html |
distribution/src/config/jvm.options
Outdated
| -XX:+UseCMSInitiatingOccupancyOnly | ||
|
|
||
| ## G1GC Configuration | ||
| # NOTE: We only support G1GC on JDK version 10 or later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this reads as, the only GC supported on JDK>=10 is G1GC (e.g. CMS not supported). Then next line reads, to "use G1GC uncomment the lines below".
Would it be better to rephrase as:
G1GC is only supported on JDK version 10 or later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I've made that change, thanks!
danielmitterdorfer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scenarios tested:
- JDK: 10
elasticsearch.yml:network.host: 0.0.0.0(to enforce bootstrap checks)jvm.options: Uncomment the G1GC-specific lines
Result:
The node starts up successfully but upon startup we see two warnings:
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
The node also uses G1GC as can be seen from the gc log:
[2018-09-21T07:38:33.305+0000][24301][gc ] Using G1
Same behavior with JDK 11 (build 11+28).
- JDK: 9
elasticsearch.yml:network.host: 0.0.0.0(to enforce bootstrap checks)jvm.options: Uncomment the G1GC-specific lines
Result:
TThe node starts up successfully with one (expected) warning:
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
and is using the CMS collector:
[2018-09-21T07:48:41.463+0000][25122][gc] Using Concurrent Mark Sweep
Similar behavior on JDK 8 (except for the deprecation warning of course and the log entries in the GC log look different).
- JDK: 10
elasticsearch.yml:network.host: 0.0.0.0(to enforce bootstrap checks)jvm.options: Keep out-of-the-box default
Result:
The node starts up successfully with one (expected) warning:
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
and is using the CMS collector:
[2018-09-21T07:41:01.880+0000][24439][gc] Using Concurrent Mark Sweep
Same behavior with JDK 11 (build 11+28).
One more observation: Should CMS one day be removed from the JDK, this will fail but given that we cannot predict the future I think this is a pretty good default.
Thanks for all your work that you put into this!
LGTM
|
w.r.t.
I forgot to mention that while this might be puzzling to a user, it is understandable that it happens because we specify |
|
Thanks for taking a look Daniel and Dimitrios |
* Add commented out JVM options for G1GC These options are available now that we will be supporting G1GC for Java 10 and above. They are also designed so that the CMS options don't have to be commented out in order for the G1 options to take effect. * Update wording
|
Why not ZGC which will be delivered with JDK 11 release tomorrow? |
|
@plokhotnyuk Because it is experimental, and much like filesystems, GC implementations take many years to mature. From our perspective, G1GC did not reach a point of maturity that we were comfortable with until JDK 10 despite being available for many years. This is why we have taken a cautious approach in supporting it, and will only support it on JDK 10 or higher. For a component of a system as fundamental as the GC implementation, it would be reckless of us to support an experimental GC implementation that has not gone through a maturation period. |
|
@jasontedor ZGC (together with Shenandoah: https://builds.shipilev.net/) is an enabler of using ES on contemporary hardware scaled up to terabytes of RAM... BTW, more than 1 year since 4TB instances are available on AWS: |
* Add commented out JVM options for G1GC These options are available now that we will be supporting G1GC for Java 10 and above. They are also designed so that the CMS options don't have to be commented out in order for the G1 options to take effect. * Update wording
You can use multi-terabyte heaps on ES with Azul Zing JVM and their pauseless GC already, although the product is not cheap... |
These options are available now that we will be supporting G1GC for Java 10 and
above. They are also designed so that the CMS options don't have to be commented
out in order for the G1 options to take effect.