Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-2481

Improve memory usage in samza-core unit tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5
    • None
    • None

    Description

      Gradle 5 reduced the default memory allocation for test executors. Before Gradle 5, our unit tests were given plenty of memory, so they ran fine. When upgrading to Gradle 5, we noticed some issues with running tests. Setting the memory (to 3GB heap) explicitly seems to have resolved the issues, but it seems odd that unit tests need so much. It would be good to investigate this possible inefficiency. It might also help build times, since heavy memory usage could mean a unnecessarily heavy unit test.

      One potential example is TestZkMetadataStore. It tests large zookeeper values (10MB), and that seems to cause some issues. If heap usage is set to 1GB or 1.5GB, then that test takes a long time to execute (seems like it might be running out of memory). This can be reproduced by changing the heap usage for "test" for the samza-core module in build.gradle, and then running "./gradlew :samza-core:test". By setting the zookeeper value to 1MB (and using 1GB of heap), the tests will execute fine. It is odd that the test works on the scale of MB but seems to have memory requirements on the scale of GB.

      Attachments

        Issue Links

          Activity

            People

              cameronlee Cameron Lee
              cameronlee Cameron Lee
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 20m
                  20m