[tahoe-dev] Tahoe-LAFS + sshfs latency issues

David-Sarah Hopwood david-sarah at jacaranda.org
Sat Jul 23 20:44:13 UTC 2011


On 23/07/11 07:36, Zooko O'Whielacronx wrote:
> On Fri, Jul 22, 2011 at 7:10 PM, Linus Lüssing <linus.luessing at web.de> wrote:
>> time scp -P 8022 root at 127.0.0.1:/music/8bitpeoples/8BP102.gif /tmp/:
>> 0m1.050s, 0m0.838s, 0m0.893s
>>
>> time cp /home/ftp/music/8bitpeoples/8BP102.gif /tmp/:
>> 0m25.539s, 0m29.389s, 0m27.414s
>>
>>
>> Without the 'tahoe put' running everything works as expected:
>>
>> time scp -P 8022 root at 127.0.0.1:/music/8bitpeoples/8BP102.gif /tmp/:
>> 0m0.937s, 0m1.001s, 0m0.962s
>>
>> time cp /home/ftp/music/8bitpeoples/8BP102.gif /tmp/
>> 0m0.651s, 0m0.587s, 0m0.624s
> 
> Okay let me get this straight. The scp is using Tahoe-LAFS SFTPD which
> is listening on port 8022, right? And the cp is using sshfs which is
> using that same Tahoe-LAFS SFTPD. So any difference in behavior
> between those two is either due to sshfs itself rather than to
> Tahoe-LAFS, or to some difference in the way sshfs uses the SFTPD vs.
> the way that scp uses the SFTPD, right?
> 
> And what you observe is that whenever you are doing a lot of uploads
> to the Tahoe-LAFS gateway then the cp takes 25 to 30 times longer?
> Wow!

By the way, using a Tahoe SFTP frontend from another SFTP client while
it is mounted as an sshfs filesystem cannot generally be recommended,
because the sshfs cache is not coherent with the other client. That is,
the other SFTP client won't necessarily see updates made by sshfs promptly,
or vice-versa, and that could in some cases lead to data loss.

However, I don't think that can be the cause of the observed latency
problem. In addition to the suggestions Zooko made,

 - What happens if the scp is copying from an OpenSSH SFTP server?
   That is, create a separate directory with the same file, serve it
   using openssh, and time an scp from that directory while doing a
   'tahoe put' as before.

 - Another thing to test is whether the scp is negotiating the same SSH
   connection parameters as sshfs. You can see this using Wireshark
   (sudo apt-get install wireshark).

-- 
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 294 bytes
Desc: OpenPGP digital signature
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20110723/6e8bc7f1/attachment.asc>


More information about the tahoe-dev mailing list