I did not say that MINA will block in IoProcessor as long as the read-buffer is not completely filled ;-) I only wondered why the read-buffer is bigger than the receiver-buffer. If the socket receiver buffer is 1024, the IoProcessor can't read more than 1024 bytes. So the read-buffer at IoProcessor wastes 1024 bytes that can never be filled, or? I expected that the IoProcessor's read buffer is <=socket-receiver buffer. But anyway.. That's not the problem ;-)
Any ideas why NIO socket buffers with MINA are x times smaller than the old IO socket buffers? Is this requested? And any idea why Win7 has a problem with it? Would it be a "good solution" to set the NIO socket buffers with MINA to let's say 4096 or 8192 by default? What's the optimal way to have Win7 with the same behavior with WinXP? - Alex On Thu, 17 Jun 2010 16:08:43 +0200, Emmanuel Lecharny <[email protected]> wrote: > > 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
