Hi Ashish,

On Dec 28, 2007 2:21 AM, Ashish Sharma <[EMAIL PROTECTED]> wrote:
> Hi
>
> Recently I have been experimenting with mina core 2 and I have a few
> questions regarding the behaviour of mina in some sample programs I made.
>
> here is the client code. its simple, it simply rams as many messages as
> possible into the server.
>
> http://pastebin.com/m14ac361e
>
> Now I made two servers. One mina based, which is simply the date/time echo
> server as described in the documentation. The second one is a simple "one
> thread per client" server. Here is the code http://pastebin.com/m3a5a14a7
>
> Now the result from both the servers differ a lot. The second server works
> in lock step with client and responds to messages without any delay. But
> with mina server the response is very slow and after about 10 messages the
> response is almost nill and after a few seconds I start getting out of
> memory exceptions while creating more date objects.
>
>
> Now I have the following questions (I very good spirit)
>
> 1. What is the reason behind this behaviour ?

Please make sure that you are using heap buffers and configured the
thread model correctly.  And I hope you are using the latest stable
release.

> 3. Is there a solution to this ? IMHO, first server example demonstrates
> that such high load can be handled at server.

If your client connects and disconnects very frequently, it might slow
down your MINA application.  Please try to keep the connection alive
whenever possible.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to