You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by gh_aiyz <gh...@hotmail.com> on 2007/07/05 11:05:59 UTC
Bad performance while opening/closing connections frequently.
Hi all,
I'm developing a server based on mina 1.03 .......... but now the performance is very bad while opening/closing connections frequently. My server is designed for web page-view statistic, so it must support frequent connection opening/closing, and a throughput of 10000 times / second is expected.
Did I do anything wrong?? or is it a problem of mina? I need your help...
Thanks
Stanley
Re: Bad performance while opening/closing connections frequently.
Posted by Maarten Bosteels <mb...@gmail.com>.
On 8/30/07, Eero Nevalainen <ee...@indagon.com> wrote:
>
> Hmm. Any suggestions as how to diagnose/verify this?
check /var/log/messages
I got this message from LogWatch:
Warning!!!:
Connections Rejected due to high load average 2 Time(s)
Max. Load Avg reached: 12
Maarten
-Eero
>
> Maarten Bosteels wrote:
> > Could also be your OS that refuses connections because of high load
> (have
> > seen this on my centOS box)
> >
> > Maarten
> >
> > On 8/30/07, peter royal <pr...@apache.org> wrote:
> >> On Aug 30, 2007, at 3:09 AM, Eero Nevalainen wrote:
> >>> I have a related problem. We have just started load testing one of
> >>> our simple servers. Nothing fancy, no tuning done as of yet, using
> >>> MINA 1.1.0.
> >>>
> >>> When our load testing script generates incoming connections
> >>> rapidly, our server starts refusing connections after 400
> >>> connections. When it's done at a slower pace we start to get
> >>> refused connections after 800 established ones. I have one
> >>> suspicion, but I'd like to confirm if someone can tell me directly
> >>> what's causing this behaviour?
> >> Are you running out of ephemeral ports? Use netstat to see if you
> >> have connections hanging around in CLOSE_WAIT or such.
> >>
> >> -pete
> >>
> >>
> >> --
> >> proyal@apache.org - http://fotap.org/~osi
> >>
> >>
> >>
> >>
> >>
> >
>
>
Re: Bad performance while opening/closing connections frequently.
Posted by Eero Nevalainen <ee...@indagon.com>.
Hmm. Any suggestions as how to diagnose/verify this?
-Eero
Maarten Bosteels wrote:
> Could also be your OS that refuses connections because of high load (have
> seen this on my centOS box)
>
> Maarten
>
> On 8/30/07, peter royal <pr...@apache.org> wrote:
>> On Aug 30, 2007, at 3:09 AM, Eero Nevalainen wrote:
>>> I have a related problem. We have just started load testing one of
>>> our simple servers. Nothing fancy, no tuning done as of yet, using
>>> MINA 1.1.0.
>>>
>>> When our load testing script generates incoming connections
>>> rapidly, our server starts refusing connections after 400
>>> connections. When it's done at a slower pace we start to get
>>> refused connections after 800 established ones. I have one
>>> suspicion, but I'd like to confirm if someone can tell me directly
>>> what's causing this behaviour?
>> Are you running out of ephemeral ports? Use netstat to see if you
>> have connections hanging around in CLOSE_WAIT or such.
>>
>> -pete
>>
>>
>> --
>> proyal@apache.org - http://fotap.org/~osi
>>
>>
>>
>>
>>
>
Re: Bad performance while opening/closing connections frequently.
Posted by Maarten Bosteels <mb...@gmail.com>.
Could also be your OS that refuses connections because of high load (have
seen this on my centOS box)
Maarten
On 8/30/07, peter royal <pr...@apache.org> wrote:
>
> On Aug 30, 2007, at 3:09 AM, Eero Nevalainen wrote:
> > I have a related problem. We have just started load testing one of
> > our simple servers. Nothing fancy, no tuning done as of yet, using
> > MINA 1.1.0.
> >
> > When our load testing script generates incoming connections
> > rapidly, our server starts refusing connections after 400
> > connections. When it's done at a slower pace we start to get
> > refused connections after 800 established ones. I have one
> > suspicion, but I'd like to confirm if someone can tell me directly
> > what's causing this behaviour?
>
> Are you running out of ephemeral ports? Use netstat to see if you
> have connections hanging around in CLOSE_WAIT or such.
>
> -pete
>
>
> --
> proyal@apache.org - http://fotap.org/~osi
>
>
>
>
>
Re: Bad performance while opening/closing connections frequently.
Posted by peter royal <pr...@apache.org>.
On Aug 30, 2007, at 3:09 AM, Eero Nevalainen wrote:
> I have a related problem. We have just started load testing one of
> our simple servers. Nothing fancy, no tuning done as of yet, using
> MINA 1.1.0.
>
> When our load testing script generates incoming connections
> rapidly, our server starts refusing connections after 400
> connections. When it's done at a slower pace we start to get
> refused connections after 800 established ones. I have one
> suspicion, but I'd like to confirm if someone can tell me directly
> what's causing this behaviour?
Are you running out of ephemeral ports? Use netstat to see if you
have connections hanging around in CLOSE_WAIT or such.
-pete
--
proyal@apache.org - http://fotap.org/~osi
Re: Bad performance while opening/closing connections frequently.
Posted by Eero Nevalainen <ee...@indagon.com>.
peter royal wrote:
> On Jul 5, 2007, at 2:05 AM, gh_aiyz wrote:
>> I'm developing a server based on mina 1.03 .......... but now the
>> performance is very bad while opening/closing connections frequently.
>> My server is designed for web page-view statistic, so it must support
>> frequent connection opening/closing, and a throughput of 10000 times
>> / second is expected.
>>
>> Did I do anything wrong?? or is it a problem of mina? I need your help...
>
> Alas, MINA does not perform the best when you do frequent setup/teardown
> of connections, due to the latency it involves on the MINA side in the
> context switch between the acceptor thread and the processing threads.
> We'd like to address this for 2.0, but don't have any code written on it
> yet. If you want to help, that'd be great! :)
I have a related problem. We have just started load testing one of our
simple servers. Nothing fancy, no tuning done as of yet, using MINA 1.1.0.
When our load testing script generates incoming connections rapidly, our
server starts refusing connections after 400 connections. When it's done
at a slower pace we start to get refused connections after 800
established ones. I have one suspicion, but I'd like to confirm if
someone can tell me directly what's causing this behaviour?
- Eero Nevalainen
Re: Bad performance while opening/closing connections frequently.
Posted by peter royal <pr...@apache.org>.
On Jul 5, 2007, at 2:05 AM, gh_aiyz wrote:
> I'm developing a server based on mina 1.03 .......... but now the
> performance is very bad while opening/closing connections
> frequently. My server is designed for web page-view statistic, so
> it must support frequent connection opening/closing, and a
> throughput of 10000 times / second is expected.
>
> Did I do anything wrong?? or is it a problem of mina? I need your
> help...
Alas, MINA does not perform the best when you do frequent setup/
teardown of connections, due to the latency it involves on the MINA
side in the context switch between the acceptor thread and the
processing threads. We'd like to address this for 2.0, but don't have
any code written on it yet. If you want to help, that'd be great! :)
-pete
--
proyal@apache.org - http://fotap.org/~osi