Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-1590

Extend TestHeapSize and ClassSize to do "deep" sizing of Objects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 0.20.0
    • None
    • None
    • None

    Description

      As discussed in HBASE-1554 there is a bit of a disconnect between how ClassSize calculates the heap size and how we need to calculate heap size in our implementations.

      For example, the LRU block cache can be sized via ClassSize, but it is a shallow sizing. There is a backing ConcurrentHashMap that is the largest memory consumer. However, ClassSize only counts that as a single reference. But in our heapSize() reporting, we want to include everything within that Object.

      This issue is to resolve that dissonance. We may need to create an additional ClassSize.estimateDeep(), we may need to rethink our HeapSize interface, or maybe just leave it as is. The two primary goals of all this testing is to 1) ensure that if something is changed and the sizing is not updated, our tests fail, and 2) ensure our sizing is as accurate as possible.

      Attachments

        Activity

          People

            Unassigned Unassigned
            streamy Jonathan Gray
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: