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

Use copy on write Map for region location cache

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.1.2
    • 1.2.0, 1.3.0, 2.0.0
    • Client
    • None
    • Reviewed

    Description

      Internally a co-worker profiled their application that was talking to HBase. > 60% of the time was spent in locating a region. This was while the cluster was stable and no regions were moving.

      To figure out if there was a faster way to cache region location I wrote up a benchmark here: https://github.com/elliottneilclark/benchmark-hbase-cache

      This tries to simulate a heavy load on the location cache.

      • 24 different threads.
      • 2 Deleting location data
      • 2 Adding location data
      • Using floor to get the result.

      To repeat my work just run ./run.sh and it should produce a result.csv

      Results:
      ConcurrentSkiplistMap is a good middle ground. It's got equal speed for reading and writing.

      However most operations will not need to remove or add a region location. There will be potentially several orders of magnitude more reads for cached locations than there will be on clearing the cache.

      So I propose a copy on write tree map.

      Attachments

        1. anotherbench3.zip
          184 kB
          Hiroshi Ikeda
        2. anotherbench2.zip
          182 kB
          Hiroshi Ikeda
        3. HBASE-14708-v17.patch
          40 kB
          Elliott Neil Clark
        4. HBASE-14708-v16.patch
          42 kB
          Elliott Neil Clark
        5. HBASE-14708-v15.patch
          41 kB
          Elliott Neil Clark
        6. HBASE-14708-v13.patch
          52 kB
          Elliott Neil Clark
        7. HBASE-14708-v12.patch
          50 kB
          Elliott Neil Clark
        8. HBASE-14708-v11.patch
          50 kB
          Elliott Neil Clark
        9. HBASE-14708-v10.patch
          50 kB
          Elliott Neil Clark
        10. HBASE-14708-v9.patch
          46 kB
          Elliott Neil Clark
        11. HBASE-14708-v8.patch
          39 kB
          Elliott Neil Clark
        12. anotherbench.zip
          180 kB
          Hiroshi Ikeda
        13. HBASE-14708-v7.patch
          20 kB
          Elliott Neil Clark
        14. HBASE-14708-v6.patch
          19 kB
          Elliott Neil Clark
        15. HBASE-14708-v5.patch
          17 kB
          Elliott Neil Clark
        16. HBASE-14708-v4.patch
          17 kB
          Elliott Neil Clark
        17. HBASE-14708-v3.patch
          16 kB
          Elliott Neil Clark
        18. HBASE-14708-v2.patch
          11 kB
          Elliott Neil Clark
        19. HBASE-14708.patch
          11 kB
          Elliott Neil Clark
        20. result.csv
          2 kB
          Elliott Neil Clark
        21. location_cache_times.pdf
          13 kB
          Elliott Neil Clark

        Activity

          People

            eclark Elliott Neil Clark
            eclark Elliott Neil Clark
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: