Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-13752

TaskDeploymentDescriptor cannot be recycled by GC due to referenced by an anonymous function

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.9.0
    • 1.9.0
    • Runtime / Coordination
    • None

    Description

      When comparing the 1.8 and 1.9.0-rc2 on a test streaming job, we found that the performance on 1.9.0-rc2 is much lower than that of 1.8. By comparing the two versions, we found that the count of Full GC of TaskExecutor process on 1.9.0-rc2 is much more than that on 1.8.

      A further analysis found that the difference is due to in TaskExecutor#setupResultPartitionBookkeeping, the anonymous function in taskTermimationWithResourceCleanFuture has referenced the TaskDeploymentDescriptor, since this function will be kept till the task is terminated,  TaskDeploymentDescriptor will also be kept referenced in the closure and cannot be recycled by GC. In this job, TaskDeploymentDescriptor of some tasks are as large as 10M, and the total heap is about 113M, thus the kept TaskDeploymentDescriptors will cause relatively large impact on GC and performance.

      Attachments

        Issue Links

          Activity

            People

              gaoyunhaii Yun Gao
              gaoyunhaii Yun Gao
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: