Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-5385

Skip calling extra gc() before spilling large bag when unnecessary

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.18.0
    • None
    • None
    • Reviewed

    Description

      In order to determine when to start spilling bags, Pig uses MemoryNotification for both MEMORY_THRESHOLD_EXCEEDED and MEMORY_COLLECTION_THRESHOLD_EXCEEDED.
      https://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryNotificationInfo.html

      Since spilling a large bag is expensive, Pig explicitly call System.gc() when the expected size is huge. I think we can skip this step when notification is based on MEMORY_COLLECTION_THRESHOLD_EXCEEDED since this means jvm has called the gc already.

      Attachments

        1. pig-5385-v01.patch
          1 kB
          Koji Noguchi

        Activity

          People

            knoguchi Koji Noguchi
            knoguchi Koji Noguchi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: