Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5117

Improve checkMemory for compaction

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.14, 1.6.0
    • Component/s: segment-tar
    • Labels:
      None
    • Flags:
      Patch

      Description

      The check introduced in OAK-4966 is relying on the first MemoryPoolMXBean found that matches the criteria. This means that, depending on the JVM, it will be checking any of the: PS Eden Space, PS Survivor Space or PS Old Gen Space - whichever is found first.

      I am proposing a more reliable way to check this:
      1. check the biggest pool - this usually corresponds to PS Old Gen (by default 2/3 of the heap), which is more stable and reflects better the usage of the heap.
      2. use getCollectionUsage() instead of getUsage() to check the state of the heap after a GC. This way we avoid checking during temporary peaks of the used heap.

        Attachments

        1. OAK-5117.patch
          3 kB
          Valentin Olteanu
        2. OAK-5117-v2.patch
          2 kB
          Alex Deparvu

          Issue Links

            Activity

              People

              • Assignee:
                stillalex Alex Deparvu
                Reporter:
                volteanu Valentin Olteanu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: