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

sendfile with group lock splits transfer into tiny chunks

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • Lustre 2.7.0
    • None
    • 3
    • 9223372036854775807

    Description

      A program using sendfile to copy a file from lustre to lustre, with a group lock on its source will see the transfer split in tiny chunks.

      Reproducer attached.

      Test setup. Create a 100MiB file.

      $ pwd
      /mnt/lustre
      $ dd if=/dev/zero of=foo1 bs=1M count=100 
      

      Transfer without a group lock:

      $ strace ~/lustre-cleanup/lustre/tests/llsendfile4 0 foo1 foo2
      ...
      sendfile(4, 3, NULL, 10485760)          = 10485760
      sendfile(4, 3, NULL, 10485760)          = 10485760
      sendfile(4, 3, NULL, 10485760)          = 10485760
      sendfile(4, 3, NULL, 10485760)          = 10485760
      sendfile(4, 3, NULL, 10485760)          = 10485760
      sendfile(4, 3, NULL, 10485760)          = 10485760
      ...
      

      With a group lock

      $ strace ~/lustre-cleanup/lustre/tests/llsendfile4 1223 foo1 foo2
      ...
      sendfile(4, 3, NULL, 10485760)          = 28672
      sendfile(4, 3, NULL, 10485760)          = 4096
      sendfile(4, 3, NULL, 10485760)          = 4096
      sendfile(4, 3, NULL, 10485760)          = 8192
      sendfile(4, 3, NULL, 10485760)          = 4096
      sendfile(4, 3, NULL, 10485760)          = 4096
      sendfile(4, 3, NULL, 10485760)          = 4096
      ...
      

      The second example takes about 10 times longer than the first.

      Attachments

        Issue Links

          Activity

            [LU-6371] sendfile with group lock splits transfer into tiny chunks

            The patch in question is http://review.whamcloud.com/14093

            adilger Andreas Dilger added a comment - The patch in question is http://review.whamcloud.com/14093

            Yes, I'll add some tests too.

            fzago Frank Zago (Inactive) added a comment - Yes, I'll add some tests too.

            It's good for you guys to run test for sendfile cases. Is it possible to generate a few test cases and add them into sanity?

            Thanks,

            jay Jinshan Xiong (Inactive) added a comment - It's good for you guys to run test for sendfile cases. Is it possible to generate a few test cases and add them into sanity? Thanks,

            Frank reported to me that the patch for https://jira.hpdd.intel.com/browse/LU-6368 fixes this issue.

            Honestly, I have no idea why. I'll try to understand why and report back.

            paf Patrick Farrell (Inactive) added a comment - Frank reported to me that the patch for https://jira.hpdd.intel.com/browse/LU-6368 fixes this issue. Honestly, I have no idea why. I'll try to understand why and report back.

            People

              wc-triage WC Triage
              fzago Frank Zago (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: