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

Minor performance impact by collecting data for SegmentCache statistics

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: segment-tar
    • Labels:

      Description

      OAK-5956 improved the statistics collected for the segment cache. As I expected this had an impact on performance as measured by our micro benchmarks. An impact is visible for ConcurrentReadTest, ConcurrentReadWriteTest and ConcurrentWriteTest. Impact on full stack operation is yet to be determined (I assume it is neglectable though).

      # ConcurrentReadTest               C     min     10%     50%     90%     max       N 
      Oak-Segment-Tar (base)             1      43     101     112     129     219     525
      Oak-Segment-Tar (OAK-5956)         1      45     104     118     138     264     496
      

      The impact seems to be mostly caused by the SegmentId.onAccess callback.

      Possible solutions:

      • Replace the SegmentId.onAccess callback with a direct reference to the underlying counter.
      • Allow disabling of the cache statistics.
      • Do nothing and accept the performance impact.

      The first approach is least attractive as it breaks encapsulation. Depending on the impact of this on full stack operations I'd either go with the 2nd or 3rd option.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mduerig Michael Dürig
                Reporter:
                mduerig Michael Dürig
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: