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

RegionMetricsStorage.incrNumericMetric is called too often

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.94.2
    • Performance
    • None

    Description

      Running an HBase scan load through the profiler revealed that RegionMetricsStorage.incrNumericMetric is called way too often.

      It turns out that we make this call for each KV in StoreScanner.next(...).
      Incrementing AtomicLong requires expensive memory barriers.

      The observation here is that StoreScanner.next(...) can maintain a simple
      long in its internal loop and only update the metric upon exit. Thus the AtomicLong is not updated nearly as often.

      That cuts about 10% runtime from scan only load (I'll quantify this better soon).

      Attachments

        1. 6503-0.96.txt
          7 kB
          Lars Hofhansl
        2. 6603-0.94.txt
          5 kB
          Lars Hofhansl

        Activity

          People

            mycnyc M. Chen
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: