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

ReplicationLogCleaner slow at large scale

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.98.0, 0.96.0
    • Replication
    • None
    • Reviewed
    • Hide
      The FileCleanerDelegate interface has changed to operate on a batch of files at a time. Any custom implementations that implemented the interface directly for cleaning HLog's (specified by hbase.master.logcleaner.plugins) or HFile's (specified by hbase.master.hfilecleaner.plugins) will have to be updated to implement the new interface or extend one of the included abstract base classes.
      Show
      The FileCleanerDelegate interface has changed to operate on a batch of files at a time. Any custom implementations that implemented the interface directly for cleaning HLog's (specified by hbase.master.logcleaner.plugins) or HFile's (specified by hbase.master.hfilecleaner.plugins) will have to be updated to implement the new interface or extend one of the included abstract base classes.
    • 0.96notable

    Description

      At a large scale the ReplicationLogCleaner fails to clean up .oldlogs as fast as the cluster is producing them. For each old HLog file that has been replicated and should be deleted the ReplicationLogCleaner checks every replication queue in ZooKeeper before removing it. This means that as a cluster scales up the number of files to delete scales as well as the time to delete each file so the cleanup chore scales quadratically. In our case it reached the point where the oldlogs were growing faster than they were being cleaned up.

      We're now running with a patch that allows the ReplicationLogCleaner to refresh its list of files in the replication queues from ZooKeeper just once for each batch of files the CleanerChore wants to evaluate.

      I'd propose updating FileCleanerDelegate to take a List<FileStatus> rather than a single one at a time. This would allow file cleaners that check an external resource for references such as ZooKeeper (for ReplicationLogCleaner) or HDFS (for SnapshotLogCleaner which looks like it may also have similar trouble at scale) to load those references once per batch rather than for every log.

      Attachments

        1. HBASE-9208-v3.patch
          26 kB
          Dave Latham
        2. HBASE-9208-v2.patch
          24 kB
          Dave Latham
        3. HBASE-9208-0.94-v2.patch
          27 kB
          Dave Latham
        4. HBASE-9208-0.94.patch
          27 kB
          Dave Latham
        5. HBASE-9208.patch
          24 kB
          Dave Latham

        Issue Links

          Activity

            People

              davelatham Dave Latham
              davelatham Dave Latham
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: