Toggle navigation OptaPlanner logo
  • Home
  • Download
  • Learn
    • Documentation
    • Videos
    • Slides
    • Training
    • Use cases
    • Compatibility
    • Testimonials and case studies
  • Get help
  • Source
  • Team
  • Services
  • Star
  • @OptaPlanner
  • Fb
Fork me on GitHub
  • Solve the facility location problem
  • Optimizing COVID-19 vaccination appointment sch...

How much faster is Java 15?

Tue 26 January 2021

Avatar Michal Tomčo

Michal Tomčo


GitHub

Quality engineer

Java 15 was released on the 15th of September 2020 and has promised to bring with it a few performance tweaks in its G1GC and ParallelGC garbage collectors.

What does it mean for OptaPlanner? Are there any benefits to be gained from upgrading from JDK11 to JDK15? In 2019, we found out that ParallelGC works better for OptaPlanner. Is that still the case a year later? Let’s put it to the test!

This article is a follow up on our Java 11 and our Java 8 performance comparison benchmarks.

Benchmark methodology

To run the benchmark we used:

  • A stable machine without any other computational demanding processes running and with Intel® Xeon® Silver 4116 @ 2.1 GHz (12 cores total / 24 threads) and 128 GiB RAM memory, running RHEL 8 x86_64.

  • Both G1 and Parallel GC for both Java versions to compare the impact of garbage collection. Executed org.optaplanner.examples.app.GeneralOptaPlannerBenchmarkApp with the parameters -Xmx3840M -server -XX:+UseG1GC and -Xmx3840M -server -XX:+UseParallelGC respectively. The results presented in this blog represent the average values taken from 10 iterations of each garbage collector and JDK combination.

  • Both OpenJDK 11 version "11.0.6" OpenJDK Runtime Environment 18.9 (build 11.0.6+10-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10-LTS, mixed mode)

  • Both OpenJDK 15 version "15.0.1" OpenJDK Runtime Environment 18.9 (build 15.0.1+9-LTS) OpenJDK 64-Bit Server VM 18.9 (build 15.0.1+9-LTS, mixed mode)

  • OptaPlanner 7.44.0.Final

  • Solving a planning problem involves no IO (except a few milliseconds during startup to load the input). A single CPU is completely saturated. It constantly creates many short-lived objects, and the GC collects them afterwards.

  • Each run solves 11 planning problems with OptaPlanner. Each planning problem runs for 5 minutes and starts with a 30 second JVM warm up which is discarded.

  • The benchmarks measure the number of scores calculated per second. Higher is better. Calculating a score for a proposed planning solution is non-trivial: it involves many calculations, including checking for conflicts between every entity and every other entity.

Executive summary

With Java 15, the average improvement is 11.24% for G1 and 13.85% for Parallel GC. The difference between the two garbage collectors running on JDK 15 is 10.05% leaning in favor of Parallel GC. For more information about difference between various GC algorithms, please see the following article that compares Java garbage collectors performance.

Parallel GC remains to be the preferred GC to be used with OptaPlanner, since the throughput is still the most relevant factor when it comes to garbage collection.

Results

Java 11 vs. Java 15

JDK11andJDK15UsingG1GC
Table 1. Score calculation count per second with G1GC

Cloud balancing

Machine reassignment

Course scheduling

Exam scheduling

Nurse rostering

Traveling Tournament

JDK

200c

800c

B1

B10

c7

c8

s2

s3

m1

mh1

nl14

JDK11

71,524

67,266

253,037

37,346

5,841

7,193

10,600

7,062

2,570

2,359

1,806

JDK15

72,285

70,786

285,668

37,371

8,405

10,049

12,382

8,205

2,952

2,730

1,997

Difference (in %)

1.06

5.23

12.9

0.07

13.42

16.85

16.81

16.19

14.86

15.73

10.58

Average (in %)

11.24

JDK11andJDK15UsingParallelGC
Table 2. Score calculation count per second with ParallelGC

Cloud balancing

Machine reassignment

Course scheduling

Exam scheduling

Nurse rostering

Traveling Tournament

JDK

200c

800c

B1

B10

c7

c8

s2

s3

m1

mh1

nl14

JDK11

76,600

76,954

296,107

49,937

6,244

7,666

12,368

7,904

2,941

2,729

2,090

JDK15

91,131

87,565

301,981

48,518

7,393

9,496

13,964

8,963

3,570

3,294

2,295

Difference (in %)

18.97

13.79

1.98

-2.84

18.40

23.87

12.90

13.40

21.39

20.70

9.81

Average (in %)

13.85

Parallel GC vs. G1 GC on Java 15

G1GCandParallelGCUsingJDK15
Table 3. Comparison of score calculation count per second on JDK15 with ParallelGC and G1GC being used

Cloud balancing

Machine reassignment

Course scheduling

Exam scheduling

Nurse rostering.

Traveling Tournament

Garbage collector

200c

800c

B1

B10

c7

c8

s2

s3

m1

mh1

nl14

JDK15 G1GC

72,285

70,786

285,668

37,371

8,405

10,049

12,382

8,205

2,952

2,730

1,997

JDK15 ParallelGC

91,131

87,565

301,981

48,518

7,393

9,496

13,964

8,963

3,570

3,294

2,295

Difference (in %)

26.07

19.16

5.40

22.97

10.39

11.49

11.33

8.46

17.31

17.12

12.98

Average (in %)

10.05

Conclusion

In conclusion, the performance gained in the JDK15 version is well worth considering regarding OptaPlanner. In addition, the preferred garbage collector to use is still ParallelGC, the performance of which is even better in comparison with G1GC than it was in our previous JDK performance comparison.


Comments Permalink
 tagged as production benchmark

Comments

Visit our forum to comment
  • Solve the facility location problem
  • Optimizing COVID-19 vaccination appointment sch...
Atom News feed
Don't want to miss a single blog post?
Follow us on
  • T
  • Fb
Blog archive
Latest release
  • 8.3.0.Final released
    Fri 5 March 2021
Upcoming events
  • KIE Live
    Worldwide - Tue 9 March 2021
    • Testing your constraints with OptaPlanner by Lukáš Petrovický, Karina Varela, Alex Porcelli
  • Javaland
    Worldwide - Tue 16 March 2021
    • AI on Quarkus: I love it when an OptaPlan comes together by Geoffrey De Smet
  • Red Hat Webinar
    Worldwide - Wed 24 March 2021
    • AI planning: Top 3 use cases and benefits by Ronald Meuwsen, Geoffrey De Smet
  • SouJava MOTU
    Worldwide - Thu 15 April 2021
    • Planejamento de Recursos com OptaPlanner by Karina Varela, Otávio Santana
Add event / Archive
Latest blog posts
  • Optimizing COVID-19 vaccination appointment scheduling
    Thu 4 March 2021
     Paul Brown
  • How much faster is Java 15?
    Tue 26 January 2021
     Michal Tomčo
  • Solve the facility location problem
    Fri 9 October 2020
     Jiří Locker
  • OptaPlanner Week 2020 recordings
    Mon 7 September 2020
     Geoffrey De Smet
  • Let’s OptaPlan your jBPM tasks (part 1) - Integrating the two worlds
    Fri 3 July 2020
     Walter Medvedeo
  • AI versus Covid-19: How Java helps nurses and doctors in this fight
    Fri 8 May 2020
     Christopher Chianelli
  • Workflow processes with AI scheduling
    Tue 5 May 2020
     Christopher Chianelli
Blog archive
Latest videos
  • YT Maintenance scheduling
    Wed 24 February 2021
     Julian Cui
  • YT Vaccination appointment scheduling
    Wed 3 February 2021
     Geoffrey De Smet
  • YT Shadow variables
    Tue 19 January 2021
     Geoffrey De Smet
  • YT Domain modeling and design patterns
    Tue 17 November 2020
     Geoffrey De Smet
  • YT Quarkus insights: AI constraint solving
    Tue 20 October 2020
     Geoffrey De Smet
  • YT AI in kotlin
    Wed 23 September 2020
     Geoffrey De Smet
  • YT Planning agility: continuous planning, real-time planning and more
    Thu 3 September 2020
     Geoffrey De Smet
Video archive

KIE projects

  • Drools rule engine
  • OptaPlanner constraint solver
  • jBPM workflow engine

Community

  • Blog
  • Get Help
  • Team
  • Governance
  • Academic research

Code

  • Build from source
  • Submit a bug
  • License (Apache-2.0)
  • Release notes
  • Upgrade recipes
Sponsored by
Red Hat
More coder content at
Red Hat Developers
© Copyright 2006-2021, Red Hat, Inc. or third-party contributors - Privacy statement - Terms of use - Website info