[Bug 252358] cp(1) of large files is causing 100% CPU utilization and poor transfer of ~168M/minute

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jan 2 21:49:40 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252358

Rick Macklem <rmacklem at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rmacklem at FreeBSD.org

--- Comment #1 from Rick Macklem <rmacklem at FreeBSD.org> ---
Created attachment 221214
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=221214&action=edit
fix the problem by using a large "len" argument for copy_file_range(2)

This patch modifies "cp" so that it uses a large "len"
argument to copy_file_range(2).
This results in far fewer copy_file_range(2) syscalls,
each of which will do a SEEK_DATA and SEEK_HOLE.

I suspect that these SEEK_DATA/SEEK_HOLE operations
are slow for large non-sparse files and doing a large
number of them caused the slowdown.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list