sftp prefetch disabled
Robey Pointer
robey at lag.net
Wed Jul 19 03:41:38 BST 2006
On 17 Jul 2006, at 10:30, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert disabled sftp prefetch a while ago, and I'm trying to figure
> out why.
>
> Specifically revision id:
> robertc at robertcollins.net-20060419233208-2ed6906796994316
> date: Thu 2006-04-20 09:32:08 +1000
>
> Has the commit message:
> ... Disable all SFTP prefetching for known paramikos - direct readv
> support is now a TODO.
There were bugs in the early implementations of prefetch. It looks
like Robert just pushed the version requirement up; he didn't
completely disable it. As far as I can tell from the current code,
prefetch is enabled for all recent versions of paramiko.
The version check could be changed to 1.6. There wasn't a 1.5.5 and
before 1.6 there were interaction issues if you used both readv() and
prefetch() (which bzr often tries to do, unfortunately). But the
version check should probably stay; I don't think it's safe to assume
that everyone has upgraded yet.
> I will probably do a little bit of testing to see what effect prefetch
> has. (I thought I was, until I dug deep enough to see this). My gut
> feeling is that for readv() it would be a net loss, but for a plain
> 'get()' it would be good.
I agree with that assessment. Currently readv() is implemented in
paramiko as a prefetch() over a limited range. That is, prefetch()
is effectively readv(everything) without waiting for the results.
robey
More information about the bazaar
mailing list