Hi Richard, Why don't you upgrade to 1.0.3 or 1.1.0? We want to make sure that we are not chasing a bug already fixed. :)
Trustin On 4/19/07, Richard Lowe <[EMAIL PROTECTED]> wrote:
Hi All, I am using Mina 1.0.0 under JRE 1.4.2 and testing it using a simple server and client program that I have written. I must say that Mina is excellent, the API is very easy to work with. I have a performance question and am hoping that you guys might be able to supply me with an answer. My server program starts up and waits for connections on a predesignated TCP port (I use a class that extends IOHandlerAdapter to send events to my server thread). Every 1/4 of a second it will write ~ 128 bytes of data to every connected session if the connection is a new session *or* the session has successfully responded to a previous 128 byte packet with a 64 byte packet of its own. I use the following tweaks to help improve performance: ByteBuffer.setAllocator(new SimpleByteBufferAllocator()); ByteBuffer.setUseDirectBuffers(false); My client program (running on a seperate machine) creates 1000 instances of an IoHandlerAdapter. Every time it receives a 128 byte packet from the server, it immediately responds with a 64 byte packet. To summarise, I'm sending 128 bytes per session every 1/4 of a second to which I am receiving 64 bytes back. The test 'server' (more accurately desktop) is an AMD Athlon 3200+ (so not the most powerful) and I am getting around 75% CPU utilisation with 1000 connections. More specifically: 100: 4%, 200: 10%, 300: 22%, 400: 38%, 500: 43%, 600: 58%, 700: 65%, 800: 66%, 900: 70%, 1000: 75% The bottleneck seems to be in the Mina layer or below. Is the performance above what you would consider to be 'optimal' or is there an obvious way of substantially reducing CPU load? Ideally I would love to support 2000+ simultaneous connections on this test machine. Is there a way of achieving this without my CPU fan flying off it's spindle and my machine setting alight? Any advice that you can offer would be very much appreciated! Cheers, Richard.
-- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
