Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I tried setting up a simple SSHD and doing an SCP of a large file from a remote machine.
I managed to move around 3 MiB/s, compared to the native implementations 11 MiB/s, which is unacceptable.
I did some analysis with JRockit Mission Control and found that the problem is Socket Read latency. Most of them Socket Reads are only 512 bytes (small packets are normally death) and quite a lot return "-2" from the java nio library, which seems to indicate an UNAVAILABLE code from sun.nio.ch.IOStatus. Thus it seems that Mina is the problem, polling to aggressively.
I originally thought the bottleneck lay in the wait/notify mechanism of ChannelPipedInputStream, but ~80000 wait/notify pairs in 3 minutes is not too bad.
Please investigate why Mina SCP suffers from bandwidth problems.
If I use localhost both as client and server, no similar problems exists.