Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-3364

Faster image and log edits loading.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.18.0
    • 0.18.0
    • None
    • None
    • Reviewed

    Description

      This patch optimizes code to provide faster load of fsimage and edits log.
      I implemented ideas mentioned in HADOOP-3022. Namely, removed unnecessary object allocations,
      and implemented optimized loading which avoids unnecessary name-space tree lookups
      if consecutive files belong to the same parent.
      I changed saveImage algorithm so that it writes first all children of the same directory,
      and then goes inside of its sub-directories. This does not change the format of the image,
      just changes the order of the stored objects.
      This should make loading faster after the image is saved with the new version.
      The advantages in performance are
      load/save fsimage: 15-20%
      load edits: 5-10%
      In terms of performance I expected somewhat more from this changes.
      Especially for edits, but it turned out that recent changes substantially slowed down
      edits loading. ADD and CLOSE operations first remove existing file with all its blocks,
      then include at back with potentially new blocks, and then ADD additionally replaces
      just inserted inode by inode-under-construction for the same file.
      This is very inefficient, but hard to fix.
      I'll do it in a separate jira.
      Other changes:

      • I combined most of the UTF8 references in one place at least for FSImage.
      • Included log messages about the startup progress with load/save times and file sizes.
      • Removed pre-crc-upgrade code from FSEdits, which was missed by the crc-remove patch.

      Attachments

        1. fastLoadImage.patch
          40 kB
          Konstantin Shvachko
        2. fastLoadImage.patch
          38 kB
          Konstantin Shvachko

        Issue Links

          Activity

            People

              shv Konstantin Shvachko
              shv Konstantin Shvachko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: