HBase
  1. HBase
  2. HBASE-9840

Large scans and BlockCache evictions problems

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Later
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I just ran into a scenario that baffled me first, but after some reflection makes sense. I ran a very large scan that filled up most of the block cache with my scan's data. I ran that scan a few times.

      That I ran a much smaller scan, and this scan will never get all its blocks cached if it does not fit entirely into the remaining BlockCache; regardless how I often I run it!

      The reason is that the blocks of the first large scan were all promoted. Since the 2nd scan did not fully fit into the cache all blocks are round-robin evicted as I rerun the scan. Thus those blocks will never get accessed more than once before they get evicted again.

      Since promoted blocks are not demoted the large scan's block will never be evicted unless we have another small enough scan/get that can promote its blocks.

      Not sure what the proper solution is, but it seems only a LRU cache that can expire blocks over time would solve this.

      Granted, this is a pretty special case.

      Edit: My usual spelling digressions.

        Activity

        Lars Hofhansl made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Later [ 7 ]
        Lars Hofhansl made changes -
        Field Original Value New Value
        Description I just ran into a scenario that baffled me first, but after some reflection makes sense. I ran a very large scan that filled up most of the block cache with my scan's data. I ran that scan a few times.

        That I ran a smaller scan, and this scan will never get all its blocks cached if it does not fit into the remaining BlockCache, regardless how I often I run it.

        The reason is that the block of the first large scan were all promoted. Since the 2nd scan did not fully fit into the cache all block a round-robin evicted as I rerun the scan, and those blocks will never get accessed more than once before they get evicted again.

        Since promoted blocks are not demoted the large scan's block will never be evicted unless we have another small enough scan that can promote its blocks.

        Not sure what the proper solution is, but it seems only a LRU cache that can expire blocks over time would solve.

        Granted, this is a pretty special case.
        I just ran into a scenario that baffled me first, but after some reflection makes sense. I ran a very large scan that filled up most of the block cache with my scan's data. I ran that scan a few times.

        That I ran a much smaller scan, and this scan will never get all its blocks cached if it does not fit entirely into the remaining BlockCache; regardless how I often I run it!

        The reason is that the blocks of the first large scan were all promoted. Since the 2nd scan did not fully fit into the cache all blocks are round-robin evicted as I rerun the scan. Thus those blocks will never get accessed more than once before they get evicted again.

        Since promoted blocks are not demoted the large scan's block will never be evicted unless we have another small enough scan/get that can promote its blocks.

        Not sure what the proper solution is, but it seems only a LRU cache that can expire blocks over time would solve this.

        Granted, this is a pretty special case.

        Edit: My usual spelling digressions.
        Lars Hofhansl created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Lars Hofhansl
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development