-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Enable G1 for Bazel and the Java host toolchain. #8423
Conversation
3842bd3 disabled G1 for Bazel itself as well as the javac workers. At that time, Bazel was using an embedded JDK 9. Now, Bazel uses Java 11, so it's worth reconsidering the choice. In particular, the introduction of parallel full G1 GC in Java 10 addressed G1 throughput issues. I tried to replicate the benchmarks mentioned by 3842bd3 and couldn't see any difference between G1 and the Old Parallel GC. (3842bd3 is not clear about the experimental protocol. My approach was to do an initial build of the target and then run "clean" between each measurement.) Additionally, on my machine, java8 and java11 startup times are within 10ms of each other. Further in G1's favor is some internal experience. We have targets that either OOM or fall into the slow full gc death march with the Old Parallel GC but do fine under G1.
@meisterT can you please run some benchmarks with thsi change? |
Thanks, I had the same change on my TODO list. I will do some performance measurements end of this week. |
I did a bunch of measurements and couldn't find any significant improvement or regression from this change on small projects. We did tests with Blaze on larger projects and have seen the same behavior as Benjamin describes in the initial post. We also slowly get bazel-nightly pipeline in place, so I'll import this change and see if there's any noticeable difference on any of the tested platforms. |
3842bd3 disabled G1 for Bazel itself as well as the javac workers. At that time, Bazel was using an embedded JDK 9. Now, Bazel uses Java 11, so it's worth reconsidering the choice. In particular, the introduction of parallel full G1 GC in Java 10 addressed G1 throughput issues. I tried to replicate the benchmarks mentioned by 3842bd3 and couldn't see any difference between G1 and the Old Parallel GC. (3842bd3 is not clear about the experimental protocol. My approach was to do an initial build of the target and then run "clean" between each measurement.) Additionally, on my machine, java8 and java11 startup times are within 10ms of each other. Further in G1's favor is some internal experience. We have targets that either OOM or fall into the slow full gc death march with the Old Parallel GC but do fine under G1. Closes bazelbuild#8423. PiperOrigin-RevId: 256334384
3842bd3 disabled G1 for Bazel itself as well as the javac workers. At that time, Bazel was using an embedded JDK 9. Now, Bazel uses Java 11, so it's worth reconsidering the choice. In particular, the introduction of parallel full G1 GC in Java 10 addressed G1 throughput issues. I tried to replicate the benchmarks mentioned by 3842bd3 and couldn't see any difference between G1 and the Old Parallel GC. (3842bd3 is not clear about the experimental protocol. My approach was to do an initial build of the target and then run "clean" between each measurement.) Additionally, on my machine, java8 and java11 startup times are within 10ms of each other. Further in G1's favor is some internal experience. We have targets that either OOM or fall into the slow full gc death march with the Old Parallel GC but do fine under G1. Closes bazelbuild#8423. PiperOrigin-RevId: 256334384
3842bd3 disabled G1 for Bazel itself as well as the javac workers. At that time, Bazel was using an embedded JDK 9. Now, Bazel uses Java 11, so it's worth reconsidering the choice. In particular, the introduction of parallel full G1 GC in Java 10 addressed G1 throughput issues.
I tried to replicate the benchmarks mentioned by 3842bd3 and couldn't see any difference between G1 and the Old Parallel GC. (3842bd3 is not clear about the experimental protocol. My approach was to do an initial build of the target and then run "clean" between each measurement.) Additionally, on my machine, java8 and java11 startup times are within 10ms of each other.
Further in G1's favor is some internal experience. We have targets that either OOM or fall into the slow full gc death march with the Old Parallel GC but do fine under G1.