On 4/5/07, yann Blazart <[EMAIL PROTECTED]> wrote:
Hi thanks for your answer, but I 've tried to set the tcpNoDelay to false on each side and I didn't saw any really performance improvment. The first problem is that if I test by only sending message but not waiting for response, mina take 0.12 ms per call, aigainst Rmi that take 0.16 ms per call with the response. Is NIO slower than BIO, but more robust ?
I guess you can say that NIO is more efficient that BIO in most cases. Usually servers need to handle lots of concurrent connections and that is where NIO really shines. In your use case, if you have just a single server and client and if there is no cpu starvation for the threads, it is not at all surprising to see better performance from BIO. In fact, due to recent OS level improvements, using a thread-per-connection model with BIO for a server seems to work pretty well for quite a few use cases. If your client and server are over the internet, do remember to factor in I/O wait times that will occur if you use BIO. If you can tell us what your use case is, we can provide better suggestions. HTH, Vinod.
