You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Cyril SANTUNE <cy...@gmail.com> on 2011/10/21 09:04:57 UTC
Who to configure the buffer size ?
Hi, I notice there is a problem with my server when the RTT is high (200ms).
I make some test and I see that the put of a file is two time shorter
than the get of the same file.
I make some capture of the traffic, I see exactly the same TCP
configuration. But, in case of get, the transmit data doesn't respect
the TCP windows. There is lot of ACK.
In short, I think that the buffer size is too small on my apache ftp
server (<65536).
is there a way to modify it with a configuration file ?
PS: I try another ftp server and after numerous test, I success with
another ftp server. So, the problem come from apache-ftpserver.
Re: Who to configure the buffer size ?
Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Fri, Oct 21, 2011 at 9:04 AM, Cyril SANTUNE <cy...@gmail.com> wrote:
> Hi, I notice there is a problem with my server when the RTT is high (200ms).
> I make some test and I see that the put of a file is two time shorter
> than the get of the same file.
>
> I make some capture of the traffic, I see exactly the same TCP
> configuration. But, in case of get, the transmit data doesn't respect
> the TCP windows. There is lot of ACK.
> In short, I think that the buffer size is too small on my apache ftp
> server (<65536).
>
> is there a way to modify it with a configuration file ?
No, we do not support configuration if the buffer size I'm afraid.
You're best option is probably to patch FtpServer with something like:
### Eclipse Workspace Patch 1.0
#P ftpserver-core
Index: src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java
===================================================================
--- src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java (revision
1139629)
+++ src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java (working
copy)
@@ -40,7 +40,7 @@
@@ -295,6 +295,7 @@
}
dataSoc.setReuseAddress(true);
+ dataSoc.setSendBufferSize(65536);
InetAddress localAddr = resolveAddress(dataConfig
.getActiveLocalAddress());
Please note that I have not tested this patch :-)
/niklas