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

Keep young storefiles at lower replication

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Later
    • None
    • None
    • regionserver
    • None

    Description

      jgray and I were brainstorming some ideas about this:

      In a typical heavy-write scenario, many store files do not last very long. They're flushed and then within a small number of seconds a compaction runs and they get deleted. For these "short lifetime" store files, it's less likely that a failure will occur during the window in which they're valid. So, I think we can consider some optimizations like the following:

      • Flush files at replication count 2. Scan once a minute for any store files in the region that are older than 2 minutes. If they're found, increase their replication to 3. (alternatively, queue them to avoid scanning)
      • More dangerous: flush files at replication count 1, but don't count them when figuring log expiration. So, if they get lost, we force log splitting to recover.

      The performance gain here is that we avoid the network and disk transfer of writing the third replica for a file that we're just about to delete anyway.

      Attachments

        1. HBASE-2821.patch
          29 kB
          Andrew Kyle Purtell
        2. HBASE-2821.patch
          29 kB
          Andrew Kyle Purtell
        3. HBASE-2821.patch
          28 kB
          Andrew Kyle Purtell
        4. lifetime-distribution.png
          5 kB
          Todd Lipcon
        5. storefile_age.pl
          0.8 kB
          Todd Lipcon

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment