[
https://issues.apache.org/jira/browse/SSHD-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17179211#comment-17179211
]
min yun law commented on SSHD-1049:
-----------------------------------
Hi, [~gnodet], thank you for pointing out the timeout issue, for my M3
environment, look like not only timeout issue. I even test the code to setup
the timeout as following:
private static final long IDLETIMEOUT = TimeUnit.SECONDS.toMillis(60*60*5L);
...
sshClient.getProperties().put(FactoryManager.IDLE_TIMEOUT,
TimeUnit.SECONDS.toMillis(IDLETIMEOUT));
sshClient.getProperties().put(FactoryManager.NIO2_READ_TIMEOUT,
TimeUnit.SECONDS.toMillis(IDLETIMEOUT+10L));
...
which I dont see such timeout event from SessionListener.sessionDisconnect()
which is reasonable because I changed to 5 hours. But my sftp copy code was
running without break and I checked the uploading file in M3 host, I didnt see
the file size get changed which mean my following code is in stall status:
private long sftpCopy(InputStream source, OutputStream sink)
throws IOException
{
long nread = 0L;
int bufferSize = SftpClient.IO_BUFFER_SIZE;
byte[] buf = new byte[bufferSize];
for (int n = source.read(buf); n > 0; n = source.read(buf))
{
sink.write(buf, 0, n);
nread += n;
}
return nread;
}
suppose like in M1/M2 environment, during sftp upload, I can see follow
SessionListener message event:
Session event coming: xxxxxxx/10.91.68.152:22 with event: KeyEstablished
but in M3 with sftp, I dont see such event message. while work using SCP in M3.
I am sorry to post the irrelevant message in this bug!
> comparison between SftpClient and sftp comand in Windows10
> ----------------------------------------------------------
>
> Key: SSHD-1049
> URL: https://issues.apache.org/jira/browse/SSHD-1049
> Project: MINA SSHD
> Issue Type: Question
> Affects Versions: 2.5.1
> Environment: windows10
> centos 7
> Reporter: Tsing Wang
> Priority: Minor
>
> # try with the latest version 2.5.1
> # comparison test
> ## method 1: using cmd.exe in windows, sftp username@host, then put large
> file, it displays about 70-80M/s
> ## method 2: using the performance test class in github
> (SftpPerformanceTest), cal t1-t0. for 100MB file, it takes about 5s to
> finish. So the rate will close to 20M/s - 30M/s, it do improve with old one(
> speed up about 3 times).
> the test result's throughput is about 1/3 compared with sftp command, so I am
> curious about what's limit for sftpclient.
>
> Also I setup a simple sshd server in target linux machine, the upload rate is
> also about 1/3. I wonder what's expect for sftp performance.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]