Date: Mon, 09 Oct 2006 11:00:45 +0300 From: Diomidis Spinellis <dds@aueb.gr> To: Hans Lambermont <hans@lambermont.dyndns.org> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: scp -c none (was Re: NFS client slow on amd64 6.2-PRERELEASE #2) Message-ID: <452A01AD.4030500@aueb.gr> In-Reply-To: <20061009072838.GG48167@leia.lambermont.dyndns.org> References: <200610081454.k98Eseas063823@lurza.secnetix.de> <4529612C.8000908@aueb.gr> <20061009072838.GG48167@leia.lambermont.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hans Lambermont wrote: > Diomidis Spinellis wrote: > >> You can also use ports/net/socketpipe. For example you can copy a >> directory with: >> >> socketpipe -b -i { tar cf - directory } -l { ssh remotehost } -r >> { tar xvf - } > > Just curious, what is the advantage of this approach to the following : > > tar cf - directory | ( ssh remotehost 'cd targetdir && tar xpf -' ) > > Something with buffering perhaps ? The advantage is a performance gain, especially on slower machines. You don't encrypt/decrypt the data, and you don't have other processes read/writing the data. However, because the data is not encrypted, and can therefore be read and modified on transfer, the approach is only suitable for closed, secure networks. With "tar cf - dir | ssh tar xf -" your data travels as follows: tar ssh sshd tar | ^ | ^ | ^ | | | | | | v | v | v | +------------+ +-------------+ |local kernel|---->|remote kernel| +------------+ +-------------+ With socketpipe, after the initial plumbing, which is performed using ssh, the data travels as follows: tar tar | ^ | | v | +------------+ +-------------+ |local kernel|---->|remote kernel| +------------+ +-------------+ The two tar processes directly write to and read from a network socket (hence the program's name). Diomidis - dds@ - http://www.spinellis.gr
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?452A01AD.4030500>