Thread: [JSch-users] Slow SFTP
Status: Alpha
Brought to you by:
ymnk
From: Frenkiel, D. <Dav...@ne...> - 2012-04-11 13:47:52
|
Hi All. I'm using JSch (version 0.1.47) to download some large files via SFTP. Everything works great but the transfer rates are really low. With command-line SFTP it's 10 times faster. Is there some configuration that will speed things up? I'm on Mac OS 10.6.8 with Java 1.6.0_29. Thanks very much. David Frenkiel |
From: Frenkiel, D. <Dav...@ne...> - 2012-04-11 14:54:59
|
After more experimentation... ChannelSftp.get(src, dest) performs as well as command-line sftp. However, ChannelSftp.get(src) doesn't perform that well. I need to use this version because I'm delivering the files directly to Amazon S3. And I don't want to store the files locally. The InputStream returned by ChannelSftp.get(src) appears to be a different implementation than the InputStream used internally by ChannelSftp.get(src, dest). If I wrap the InputStream in a BufferedInputStream with a large buffer (e.g. 131072) performance is better. But it's takes about 5 times as long as using ChannelSftp.get(src, dest) directly. Any thoughts? Thanks again. On 4/11/12 9:35 AM, "Frenkiel, David" <Dav...@ne...> wrote: Hi All. I'm using JSch (version 0.1.47) to download some large files via SFTP. Everything works great but the transfer rates are really low. With command-line SFTP it's 10 times faster. Is there some configuration that will speed things up? I'm on Mac OS 10.6.8 with Java 1.6.0_29. Thanks very much. David Frenkiel |
From: <ym...@jc...> - 2012-04-11 15:13:00
|
Hi, +-From: "Frenkiel, David" <Dav...@ne...> -- |_Date: Wed, 11 Apr 2012 10:54:47 -0400 ____________________________ | |After more experimentation... |ChannelSftp.get(src, dest) performs as well as command-line sftp. |However, ChannelSftp.get(src) doesn't perform that well. Ah, the implementation of the later method has not been using bulk requests. The "bulk request" is not the formal technical term, but you will find that OpenSSH's sftp has the option "-R" for it. Anyway, I'll try to implement it. Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 Skype callto://jcraft/ Twitter: http://twitter.com/ymnk Facebook: http://facebook.com/aymnk |
From: <ym...@jc...> - 2012-04-12 08:49:55
|
Hi, +-From: ym...@jc... (Atsuhiko Yamanaka) -- |_Date: Thu, 12 Apr 2012 00:12:47 +0900 ______ | |Ah, the implementation of the later method has not been using bulk |requests. The "bulk request" is not the formal technical term, |but you will find that OpenSSH's sftp has the option "-R" for it. |Anyway, I'll try to implement it. I have tried to implement it. Try it if you have opportunities, http://www.jcraft.com/jsch/jsch-0.1.48-rc1.zip Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 Skype callto://jcraft/ Twitter: http://twitter.com/ymnk Facebook: http://facebook.com/aymnk |