Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-12867

DNE3: new DNE2 hash function to handle rsync temporary filename

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      When copying or resyncing a file with rsync it will create a temporary pathname for the target file, copy the data into the temporary pathname, and then rename the file over the original in order to avoid damaging the original file if the rsync is interrupted.

      $ rsync twoshoes.dilger.ca:/myth/tv/2103_20150920012700.mpg .
      ^Z
      ls -l .2*
       3328 -rw-------  1 adilger 2883584 Oct 16 09:10 .2103_20150920012700.mpg.gyCFCs
      

      It is creating a temporary file with a leading "." and a trailing ".XXXXXX" using mktemp(3) or similar. When the temporary filename is renamed to the target filename in a striped directory, it would likely move to a new MDT and become a remote entry. That causes overhead due to invoking remote rename operations, and leaves a lasting performance impact due to the remote directory entry.

      It would be useful to add a new hash function (e.g. FNV_1a_TEMP) that will handle the case of filenames with a leading "." and trailing ".xxxxxx" 6-8 chars after the "." by dropping those parts of the filename and using the remaining characters for the hash, on the assumption that the final filename would be the just the remaining characters. That will keep the rename to be local to a single MDT in most cases, and not be worse than the current case.

      Attachments

        Issue Links

          Activity

            [LU-12867] DNE3: new DNE2 hash function to handle rsync temporary filename

            This functionality was included into the patch https://review.whamcloud.com/36775 "LU-11025 dne: introduce new directory hash type: 'crush'" which landed for 2.14.

            adilger Andreas Dilger added a comment - This functionality was included into the patch https://review.whamcloud.com/36775 " LU-11025 dne: introduce new directory hash type: 'crush' " which landed for 2.14.
            gerrit Gerrit Updater added a comment - - edited

            Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36799
            Subject: LU-12867 dne: place temp file on MDT where target is
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 92d3050f760f00f22e85abdc456fe8ccb2d6e7f4

            gerrit Gerrit Updater added a comment - - edited Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36799 Subject: LU-12867 dne: place temp file on MDT where target is Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 92d3050f760f00f22e85abdc456fe8ccb2d6e7f4

            I believe that MPIFileUtils dcp is also creating temporary filenames for the target, so it would be good to handle this case as well, possibly modifying the MPIFileUtils code to make this filename pattern more easily detected.

            adilger Andreas Dilger added a comment - I believe that MPIFileUtils dcp is also creating temporary filenames for the target, so it would be good to handle this case as well, possibly modifying the MPIFileUtils code to make this filename pattern more easily detected.

            People

              laisiyao Lai Siyao
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: