[LU-6371] sendfile with group lock splits transfer into tiny chunks Created: 16/Mar/15 Updated: 30/Jan/22 Resolved: 30/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.7.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Frank Zago (Inactive) | Assignee: | WC Triage |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 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. |
| Comments |
| Comment by Patrick Farrell (Inactive) [ 16/Mar/15 ] |
|
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. |
| Comment by Jinshan Xiong (Inactive) [ 17/Mar/15 ] |
|
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, |
| Comment by Frank Zago (Inactive) [ 17/Mar/15 ] |
|
Yes, I'll add some tests too. |
| Comment by Andreas Dilger [ 18/Mar/15 ] |
|
The patch in question is http://review.whamcloud.com/14093 |