From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 16 17:10:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5A061CA5 for ; Tue, 16 Apr 2013 17:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 245439A5 for ; Tue, 16 Apr 2013 17:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3GHA1jd005035 for ; Tue, 16 Apr 2013 17:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3GHA1L1005034; Tue, 16 Apr 2013 17:10:01 GMT (envelope-from gnats) Resent-Date: Tue, 16 Apr 2013 17:10:01 GMT Resent-Message-Id: <201304161710.r3GHA1L1005034@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andre Albsmeier Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 889842AF for ; Tue, 16 Apr 2013 17:03:10 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2FF929 for ; Tue, 16 Apr 2013 17:03:09 +0000 (UTC) Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id r3GGoKK8013001 for ; Tue, 16 Apr 2013 18:50:20 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.13.6/8.13.6) with ESMTP id r3GGoJ6D029171 for ; Tue, 16 Apr 2013 18:50:19 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.6/8.14.6) id r3GGoJ1X019927 for FreeBSD-gnats-submit@freebsd.org; Tue, 16 Apr 2013 18:50:19 +0200 (CEST) Message-Id: <201304161650.r3GGoJtS009110@curry.mchp.siemens.de> Date: Tue, 16 Apr 2013 18:50:19 +0200 (CEST) From: Andre Albsmeier To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: bin/177885: regression on cp performance X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 17:10:01 -0000 >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: