From owner-cvs-all@FreeBSD.ORG Mon Mar 17 16:12:42 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D8F1065672; Mon, 17 Mar 2008 16:12:42 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out-03.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id F17858FC22; Mon, 17 Mar 2008 16:12:41 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-av-04.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-03.forthnet.gr (8.13.8/8.13.8) with ESMTP id m2HFOqQv015125; Mon, 17 Mar 2008 17:24:52 +0200 Received: from MX-IN-04.forthnet.gr (mx-in-04.forthnet.gr [193.92.150.163]) by mx-av-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id m2HFOa9U017446; Mon, 17 Mar 2008 17:24:36 +0200 Received: from [192.168.136.22] (adsl103-10.kln.forthnet.gr [77.49.110.10]) by MX-IN-04.forthnet.gr (8.14.2/8.14.2) with ESMTP id m2HFOXKc029564; Mon, 17 Mar 2008 17:24:35 +0200 Authentication-Results: MX-IN-04.forthnet.gr smtp.mail=dds@aueb.gr; spf=neutral Authentication-Results: MX-IN-04.forthnet.gr header.from=dds@aueb.gr; sender-id=neutral Message-ID: <47DE8D10.9090201@aueb.gr> Date: Mon, 17 Mar 2008 17:24:00 +0200 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <200712180849.lBI8nmEi088947@repoman.freebsd.org> <20071218100355.GR16982@elvis.mu.org> <20080314223652.GA20470@garage.freebsd.pl> In-Reply-To: <20080314223652.GA20470@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.ORG, Alfred Perlstein , src-committers@FreeBSD.ORG, Diomidis Spinellis , cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/tools/regression/bin/mv regress.sh X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2008 16:12:42 -0000 Pawel Jakub Dawidek wrote: > On Tue, Dec 18, 2007 at 02:03:55AM -0800, Alfred Perlstein wrote: >> * Diomidis Spinellis [071218 00:48] wrote: >>> dds 2007-12-18 08:49:47 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> tools/regression/bin/mv regress.sh >>> Log: >>> Add more tests. All rename(2)-based tests now succeed. >>> The performance of the cross-device equivalents is under investigation. >> Diomidis, >> >> Does 'mv' spawn off tar or something to do the copy part? >> >> You can _usually_ get much better cross device performance >> by hooking two processes together like so: >> >> tar -cf - -C /path/to/source . | tar -xf - -C /path/to/dst >> >> This will keep the disks a lot busier, but this can make >> things worse on cross device moves that happen to be >> on the same disk. > > I was thinking about adding two options to cp(1) (-1 and -2) to give > cp(1) a hint if the copy is done inside one disk or between separate > disks. In -1 case cp(1) will read as large blocks as possible and then > write them, in -2 case it will spawn two threads: one reader and one > writer working in parallel. Performance improvements are very visible > from what I tested. > Adding hints to cp(1) hinders portability. Even on the same OS, if two systems have their disks differently configured, a script may end up with an inappropriate hint on one of the two. Why not use fstat(2) to automatically determine if the file resides on different disks, and act accordingly? -- Diomidis Spinellis - http://www.spinellis.gr