mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Johns" <steven.mark.jo...@gmail.com>
Subject Re: Write slow or OOM?
Date Wed, 02 Apr 2008 09:10:54 GMT
Thank you very much.

1) I used Mina1.1.5 NOT 2.0 M1.
2) Actually telnet client is on the same machine as my Mina server. Could it
be SLOW?

In order to test how fast Mina could write, I modified the
ReverseProtocolHandler example. I added following code in the
ReverseProtocolHandler:

public void sessionCreated(IoSession session) throws Exception {
     String message =
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";

     while (true) {
      for (int i = 0; i < 5000; i++)
       session.write(message);

      Thread.sleep(500);
     }
    }

and I opened a telnet client connect to it. However, when I PrintGCDetails,
i obversed that GC is so busy to collect (take 0.15 sec to collect once, and
keep collecting )and after a while it seems too slow to collect. Eventually
OOM.

I don't know if my code added was correct or NOT. I was impressed when you
said your server could handle 140k message/sec. How could you possible do
that? ^^
On Wed, Apr 2, 2008 at 11:30 AM, "이희승 (Trustin Lee) <trustin@gmail.com>
wrote:

> Hi Steve,
>
> OOM can be raised when the write request rate is so high.  There are two
> possible issues:
>
> 1) MINA NioProcessor is writing slowly.
> 2) Receiving party (i.e. telnet client) is receiving slowly.
>
> If #1 is the case, we need to fix it.  However, I was able to achieve
> 140k messages per second for asynchronous messaging and 20k messages per
> second for synchronous messaging in my private performance test
> performed in gigabit network recently.  Just in case your scenario is
> triggering a hidden bug in MINA, please provide us a simple test
> application.
>
> HTH,
>
> Steve Johns wrote:
> > So far Mina does a good job in my recent project until yesterday. I am
> > working a GW server handling 10k - 15k incoming messages/sec with NOT
> very
> > big sizes and send them to clients. The weird thing is the program has
> NO
> > problem to consume the incoming messages(decoding, read). However, when
> a
> > simple telnet client connected to my server(same machine), I observed
> the GC
> > taking 0.5 - 1.0sec to do GC every time and eventually OOM(GC is NOT
> > faster??). I got serveral questions:
> > 1) just wonder if mina is able to write that many of messages? I believe
> > telnet client on the same machine NOT considered to be a SLOW client,
> right?
> > 2) IF 1) Yes, the problem seems GC limitation but NOT Mina problem?
> >
> > Thanks.
> >
>
> --
> Trustin Lee - Principal Software Engineer, JBoss, Red Hat
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message