On Tue, 22 Jun 2010 10:49:52 +0200, Emmanuel Lecharny
<[email protected]> wrote:
>
> There won't be official MINA statement ...
Hehe. For me, that's a kind of official statement ;-)
>
> All that we can say is that you should configure the send-buffer size in
> order to increase the throughput, and measure the impact on such
> modification.
>
> This parameter is configurable so that users can modify it :)
>
> I'm not even sure that the default size were selected with anything in
mind
> but pure blind guess.
Okay, I think that's an important hint. If I have a look at
NioSocketAcceptor class in method "protected ServerSocketChannel
open(SocketAddress localAddress)", I can see that the default value that is
defined by MINA is set:
----
try {
// This is a non blocking socket channel
channel.configureBlocking(false);
// Configure the server socket,
ServerSocket socket = channel.socket();
// Set the reuseAddress flag accordingly with the setting
socket.setReuseAddress(isReuseAddress());
// XXX: Do we need to provide this property? (I think we need
to remove it.)
socket.setReceiveBufferSize(getSessionConfig().getReceiveBufferSize());
// and bind.
socket.bind(localAddress, getBacklog());
// Register the channel within the selector for ACCEPT event
channel.register(selector, SelectionKey.OP_ACCEPT);
success = true;
}
----
The comment already has some doubt if this is correct or not. I'm
currently analyzing what would be the default value before setting the mina
default...
br,
Alex