-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
preview: add Shenandoah GC to openjdk packages by default #37722
Conversation
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: openjdk9 Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: openjdk9 Partial log (click to expand)
|
Are there any benchmarks available for real world nixpkgs use cases? E.g. libreoffice? |
To be honest, I'd think this is more likely to be useful for server workloads where consistent pause times at high heap sizes and large loads are a bigger priority than throughput; most desktop apps I'd hope aren't taking obscene amounts of RAM where proportional GC time starts being a major issue -- does LibreOffice really suffer from such bad pause times with large heaps? It really depends on how they set up their JRE to run... Then again, desktop applications are precisely the place you want consistent latency, so maybe it's worth trying! But I haven't done that, I'm testing That said, I can't give my own conclusive benchmarks yet, but in my limited testing, the basic results seem to align with what're on the Shenandoah wiki -- greatly lowered and far more consistent pause times with GC-heavy workloads at medium-ish heap sizes (in my case, about 16GB-20GB live). |
e32979c
to
2ef7771
Compare
Success on aarch64-linux (full log) Attempted: diffoscope The following builds were skipped because they don't evaluate on aarch64-linux: openjdk, openjdk10, openjdk8 Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: diffoscope, openjdk, openjdk10, openjdk8 Partial log (click to expand)
|
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2ef7771
to
b6cf384
Compare
Now with JDK 10 support; JDK 8 will be coming up soon once the Shenandoah backports for jdk8u are available... |
Success on x86_64-linux (full log) Attempted: openjdk10 Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: openjdk10 Partial log (click to expand)
|
A package option would be the least intrusive way to introduce this feature. Mainly because seems not clear what other effects Shenandoah has when |
I disagree.
There is no difference except this GC is enabled and compiled in (the backport Shenandoah branches are always merged to stable JDK branches with no other differences, ports normally need to deal with a little code movement and that's it). That's why I enabled it unilaterally.
I don't agree adding options for everything is necessary, even in this case. But It doesn't actually matter in the long run anymore, because Shenandoah is part of JDK 12 officially, finally (as well as ZGC in JDK11). So this should be closed, regardless. |
Motivation for this change
Shenandoah is a new, ultra-low pause time garbage collector for the JVM that collects garbage concurrently as the program runs, allowing GC times that do not scale proportional to the heap size: collecting a heap with a size of of 100GB or a 2GB size has the same pause behavior, which should be predictable.
Background
Shenandoah is enabled by updating the
hotspot
component of the OpenJDK build topoint to the Shenandoah fork -- thanks to a JDK 9 backport from the developers that is continuously kept up to date with the latest JDK versions, this is viable without bitrotting the packages, or having to put them under separate names.
While the
hotspot
component comes from the Shenandoah fork, it is not the default GC in this branch -- G1 still reigns by default on x86_64 Linux, and as the branch is kept up to date, still gets all the latest fixes.This change was based on the Gentoo IcedTea build (which features Shenandoah support as a USE flag).
User impact
None by default; Shenandoah is opt-in only. This can be enabled with
-XX:+UseShenandoahGC
, e.g.Still not done
The developers also keep backports of Shenandoah to JDK8 and (the new) JDK10. I would like it to be added to all these packages as well, to give a consistent preview feature set to all
openjdk*
package users. Currently, for JDK 8, I'm waiting on a new merge with the upstreamjdk8u-updates
branch (the fork is a tiny bit behind), while JDK10 is still not yet packaged.Things done
build-use-sandbox
innix.conf
on non-NixOS)macOSTested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests).openjdk9
is not the default JDK (openjdk8
is), so almost nothing is tested by it now. I have done my own testing.Tested compilation of all pkgs that depend on this change usingnix-shell -p nox --run "nox-review wip"
.openjdk9
is not the default JDK (openjdk8
is), so almost nothing is rebuilt by changing this. I have done my own testing../result/bin/
)