[Bug 296466] copy_file_range can be very slow on zfs even for small files

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 03 Jul 2026 15:24:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296466

--- Comment #6 from martin@lispworks.com ---
(In reply to Oleksandr Kryvulia from comment #2)

It is fast if I set atime=off.

It is also fast if I set compression=off and recreate the test file (so it's
not compressed).

The output of procstat -kk looks like this when it is slow:

  PID    TID COMM                TDNAME              KSTACK                     
 9951 101982 install             -                   mi_switch+0xbd
_cv_wait+0xfb txg_wait_synced_impl+0xb9 txg_wait_synced+0xb
dmu_offset_next+0x80 zfs_holey+0x11a zfs_freebsd_ioctl+0x4b
vn_generic_copy_file_range+0x67d vn_copy_file_range+0x25d
kern_copy_file_range+0x3be sys_copy_file_range+0x78 amd64_syscall+0x117
fast_syscall_common+0xf8

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