Re: cvs commit: src/tools/regression/bin/mv regress.sh

[ Available lists | Index of cvs-all | Month of Mar 2008 | Week of 17 Mar 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Pawel Jakub Dawidek <pjd@FreeBSD.org>
Date
17 Mar 2008 14:46:31
Subject
Re: cvs commit: src/tools/regression/bin/mv regress.sh
Message-ID
20080314223652.GA20470@garage.freebsd.pl


[ Hide this part ]
On Tue, Dec 18, 2007 at 02:03:55AM -0800, Alfred Perlstein wrote:
> * Diomidis Spinellis <dds@FreeBSD.org> [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.

--
Pawel Jakub Dawidek http://www.wheel.pl
pjd@FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!


[ Show this part (application/pgp-signature) ]

Elapsed time: 0.262 seconds