bin/177885: regression on cp performance

Andre Albsmeier Andre.Albsmeier at
Tue Apr 16 17:10:01 UTC 2013

>Number:         177885
>Category:       bin
>Synopsis:       regression on cp performance
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 16 17:10:00 UTC 2013
>Originator:     Andre Albsmeier
>Release:        FreeBSD 9.1-STABLE i386

System: FreeBSD 9.1-STABLE #0: Sun Apr 7 11:10:42 CEST 2013


When copying large files (300MB here) with cp from the local
machine to a NFS mounted drive, the performance is bad:

user at 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 at 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.


See above.


Revert r184342 or use this patch:

--- bin/cp/utils.c.ORI  2012-09-24 18:09:20.000000000 +0200
+++ bin/cp/utils.c      2013-04-16 18:47:12.000000000 +0200
@@ -68,6 +68,9 @@
  * smaller than MAXPHYS */
 copy_file(const FTSENT *entp, int dne)

More information about the freebsd-bugs mailing list