Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2013 18:50:19 +0200 (CEST)
From:      Andre Albsmeier <Andre.Albsmeier@siemens.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/177885: regression on cp performance
Message-ID:  <201304161650.r3GGoJtS009110@curry.mchp.siemens.de>
Resent-Message-ID: <201304161710.r3GHA1L1005034@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

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

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

>Description:

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.

>How-To-Repeat:

See above.

>Fix:

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 */
 #define BUFSIZE_SMALL (MAXPHYS)
 
+#undef BUFSIZE_MAX
+#define BUFSIZE_MAX (MAXPHYS)
+
 int
 copy_file(const FTSENT *entp, int dne)
 {
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304161650.r3GGoJtS009110>