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

SchemaMetrics.updateOnCacheHit costs too much while full scanning a table with all of its fields

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.94.0
    • 0.94.3
    • metrics
    • Reviewed

    Description

      The SchemaMetrics.updateOnCacheHit costs too much while I am doing the full table scanning.
      Here is the top 5 hotspots within regionserver while full scanning a table: (Sorry for the less-well-format)

      CPU: Intel Westmere microarchitecture, speed 2.262e+06 MHz (estimated)
      Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 5000000
      samples % image name symbol name
      -------------------------------------------------------------------------------
      98447 13.4324 14033.jo void org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics.updateOnCacheHit(org.apache.hadoop.hbase.io.hfile.BlockType$BlockCategory, boolean)
      98447 100.000 14033.jo void org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics.updateOnCacheHit(org.apache.hadoop.hbase.io.hfile.BlockType$BlockCategory, boolean) [self]
      -------------------------------------------------------------------------------
      45814 6.2510 14033.jo int org.apache.hadoop.hbase.KeyValue$KeyComparator.compareRows(byte[], int, int, byte[], int, int)
      45814 100.000 14033.jo int org.apache.hadoop.hbase.KeyValue$KeyComparator.compareRows(byte[], int, int, byte[], int, int) [self]
      -------------------------------------------------------------------------------
      43523 5.9384 14033.jo boolean org.apache.hadoop.hbase.regionserver.StoreFileScanner.reseek(org.apache.hadoop.hbase.KeyValue)
      43523 100.000 14033.jo boolean org.apache.hadoop.hbase.regionserver.StoreFileScanner.reseek(org.apache.hadoop.hbase.KeyValue) [self]
      -------------------------------------------------------------------------------
      42548 5.8054 14033.jo int org.apache.hadoop.hbase.KeyValue$KeyComparator.compare(byte[], int, int, byte[], int, int)
      42548 100.000 14033.jo int org.apache.hadoop.hbase.KeyValue$KeyComparator.compare(byte[], int, int, byte[], int, int) [self]
      -------------------------------------------------------------------------------
      40572 5.5358 14033.jo int org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$BlockIndexReader.binarySearchNonRootIndex(byte[], int, int, java.nio.ByteBuffer, org.apache.hadoop.io.RawComparator)~1
      40572 100.000 14033.jo int org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$BlockIndexReader.binarySearchNonRootIndex(byte[], int, int, java.nio.ByteBuffer, org.apache.hadoop.io.RawComparator)~1 [self]

      Attachments

        1. onhitcache-trunk.patch
          7 kB
          Cheng Hao
        2. metrics_hotspots.png
          57 kB
          Cheng Hao
        3. 6852-0.94.txt
          7 kB
          Lars Hofhansl
        4. 6852-0.94_2.patch
          8 kB
          Cheng Hao
        5. 6852-0.94_3.patch
          7 kB
          Cheng Hao

        Activity

          People

            hcheng Cheng Hao
            hcheng Cheng Hao
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: