On 4/4/06, Trustin Lee <[EMAIL PROTECTED]> wrote: > On 4/4/06, Michael Bauroth <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I've just implemented a simple client/server pair. Next I've tried to > > run some data transfer (consuming)) performance tests (all happened in 2 > > JVM's on a single shared server). > > The problem is that from a specific load on the data come quicker into > > the server then it could handle them. When I'm right, the extra data > > will be stored in the incoming pipeline, right? What happens, if this > > pipeline is full? And how can I prevent from such situations? > > > You're right. The server will get broken throwing an OutOfMemoryError. We > have to implement an IoFilter which prevents this situation. You can > control the I/O traffic by calling IoSession.suspend/resumeRead/Write() > method, so it should be done quite easily.
I think there should be a param that allows the read buffer size to be configured. An OutOfMemoryError is ghastly! MINA shouldnt read() from the session if the buffer is already full. This will cause the kernel buffer to get filled up, causing the flow control mechanism to kick in. This will cause the sender to send less data, just enough that the receiver can consume. Regards, Vinod.
