Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

benjaminp
Copy link
Collaborator

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.

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.
@aiuto aiuto requested a review from buchgr May 28, 2019 01:22
@aiuto aiuto added the team-Rules-Java Issues for Java rules label May 28, 2019
@buchgr
Copy link
Contributor

buchgr commented Jun 3, 2019

@meisterT can you please run some benchmarks with thsi change?

@meisterT meisterT self-assigned this Jun 3, 2019
@meisterT
Copy link
Member

meisterT commented Jun 3, 2019

Thanks, I had the same change on my TODO list. I will do some performance measurements end of this week.

@meisterT
Copy link
Member

meisterT commented Jul 3, 2019

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.

@bazel-io bazel-io closed this in 01e6e05 Jul 3, 2019
siberex pushed a commit to siberex/bazel that referenced this pull request Jul 4, 2019
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
irengrig pushed a commit to irengrig/bazel that referenced this pull request Jul 15, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants