Comment 3 for bug 622566

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 622566] [NEW] ftp access inefficiency

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/23/2010 1:58 AM, Alexander Belchenko wrote:
> Public bug reported:
>
> Doing a pull of couple revisions over FTP is very slow. Today I've spent
> about 4 minutes to pull 1 revision with changes in 2 files which are not
> very big. After pull new pack in my 2a repo is only 6KB big.
>
> Looking at the .bzr.log I see that bzr downloading the same pack file
> from the FTP server again and again and again:

Just to mention we've known about this for quite some time (I'm a bit
surprised there isn't already a bug).

Basically, we don't support partial requests from an existing file
(readv). and we don't cache the file content between requests. So 10
separate readv requests for 10 bytes each on a 100MB file will download
10*100MB = 1GB just to offer up the 100 bytes requested.

I think the fix is to figure out how to do partial reads, since some ftp
clients do support 'resume', which must have some sort of support for
requesting the content that doesn't start at the start of the file.

That said, our FTP support is 'functional' but *far* from optimal. If
you have any chance to use sftp instead, do so. Even better if you just
use bzr+ssh...

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxymbkACgkQJdeBCYSNAAOQYQCfVJUIzcVDTDF1lt9F38sd5VKI
aMYAnikFo46SBNJbKCY6Nmqzs0wF2IPB
=tIj3
-----END PGP SIGNATURE-----