Bug 177885

Summary: [patch] cp(1): regression on cp performance
Product: Base System Reporter: Andre.Albsmeier
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me Keywords: patch
Priority: Normal    
Version: 9.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Andre.Albsmeier 2013-04-16 18:10:00 UTC
When copying large files (300MB here) with cp from the local
machine to a NFS mounted drive, the performance is bad:

user@host:>time cp file /mnt/
cp file /mnt/  0,00s user 1,50s system 5% cpu 25,246 total

When reverting the effects of r184342 of bin/cp/utils.c by
the patch shown below, performance is back again:

user@host:>time cp file /mnt/
cp file /mnt/  0,00s user 0,43s system 7% cpu 5,732 total

Verified on several hosts, all running FreeBSD 9.1-STABLE,
all using UFS (not ZFS).

FreeBSD 7.4 does not show this bug since r184342 wasn't
merged here.

Fix: Revert r184342 or use this patch:
How-To-Repeat: 
See above.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:48 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:33:53 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>