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

sendfile with group lock splits transfer into tiny chunks

    XMLWordPrintable

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

            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: