On 6/17/10 3:54 PM, Alexander Christian wrote:
Why is the IoProcessor waiting for 2048 bytes when the socket's buffer is at 1024. My understanding is, that MINA is then always trying top read more from the socket as there is data available in recv buffer. Does this make any sense?
I don't think it's the way it's working. Actually, once some data are read from the socket, whatever thebuffer size is, it's propagated to the chain, so there is no wait, unless you can't decode a message completely because you are expecting some more data.
However, it won't be performant as you have to wait for another full loop through all the selected sessions before being able to process the next bytes.
OTOH, as you copy data from the socket buffer into memory, the bigger the buffer, the more memory you eat. If you have many sessions - I mean, thousands -, then t can kill the server if each of those session has 60Kb of pending data in buffers.
It's a balance, here.-- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
