Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-13073

Unexpected GC when using Java 11

Details

    Description

      Beam SDK has been supporting Java 11 for a while (I guess the support was introduced here https://issues.apache.org/jira/browse/BEAM-2530). Unfortunately, in Spotify we are still experiencing performance issues when using Beam SDK 2.32, Google Dataflow and Java 11.

      Thanks to emilyye and iht, they confirmed JVM 11 is using SerialGC, while Java 8 uses ParallelGC. It sounds like ParallelGC is a good option for high throughput / low latency jobs. For Java11 we'd expect to use G1GC or ParallelGC.

      This SO question [1] clarifies that JVM chooses SerialGC when it treats the machine as a "client". It looks like the Java SDK container could benefit from using `-XX:+AlwaysActAsServerClassMachine`. Is that correct?

      Let me know if the ticket needs further context or adjustment. (It is my first time creating a ticket here).

       [1] https://stackoverflow.com/questions/52474162/why-is-serialgc-chosen-over-g1gc

      Attachments

        1. perf_regression_java_11.png
          150 kB
          Valentyn Tymofieiev

        Activity

          People

            kenn Kenneth Knowles
            labianchin Luis
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m