From 815a36f52f2e1a2211b58d7eab31cdcb97709dee Mon Sep 17 00:00:00 2001 From: pkures Date: Wed, 22 Apr 2015 13:05:25 +0200 Subject: [PATCH] increase buffer size to improve transfer speed 1024 byte buffer size is insufficient for transfering large files over faster (> 100Mbit) networks. We are transfering files tens or hundreds MB in size and transfer speed was 1MB/s. After increasing the buffer size too 100KB we are getting transfer speeds up to 60MB/s. Please consider increasing the BUFFER_SIZE in the next Ant release. Thanks, Peter --- .../apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java index c1b6b8c7b..5d4271d25 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java @@ -36,7 +36,7 @@ import com.jcraft.jsch.Session; public class ScpToMessage extends AbstractSshMessage { private static final int HUNDRED_KILOBYTES = 102400; - private static final int BUFFER_SIZE = 1024; + private static final int BUFFER_SIZE = 100*1024; private File localFile; private String remotePath;