Date: Wed, 29 May 2002 21:45:53 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Peter Leftwich <Hostmaster@Video2Video.Com> Cc: Matthias Buelow <mkb@mukappabeta.de>, FreeBSD LIST <FreeBSD-Questions@FreeBSD.Org> Subject: Re: mv vs. tar [overlapping] Message-ID: <20020530024553.GC78068@dan.emsphone.com> In-Reply-To: <20020529223005.O79882-100000@earl-grey.cloud9.net> References: <20020530022609.GA956@altair.mukappabeta.net> <20020529223005.O79882-100000@earl-grey.cloud9.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 29), Peter Leftwich said: > On Thu, 30 May 2002, Matthias Buelow wrote: > > Dan Nelson writes: > > > A tar pipe will be much faster, since reading and writing will be overlapped. > > > ( cd /source ; tar cf - . ) | ( cd destination ; tar xfp - ) > > eh? sorry but I think that's nonsense. --mkb > > Actually, it's an interesting point... I think what Dan means is that read > and write processes run concurrently (have you ever run multiple HTTP > requests at once? it's a lot like that I suppose). So it would seem > tarring is quickest when moving a directory within the same filesystem! Even to different filesystems. A single process can only be reading or writing, and when it's blocked reading, it can't be writing. If you are copying files over a couple meg, it also helps to increase the buffering between the two tars by putting team (from ports) inbetween them, and raising tar's blocksize: ( cd /source ; tar cbf 128 - . ) | team 1m 4 | ( cd /destination ; tar xbpf 128 - ) If you're talking about /moving/ within the /same/ filesystem, nothing will beat "mv", since all it does is rename the files to the new location. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020530024553.GC78068>