You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2007/10/19 08:12:05 UTC

Re: 答复: reply: mina performance

I am also very busy these days unfortunately.  Anyone who wants to help 向锋?

Trustin

On 10/19/07, 李向锋 <li...@infosec.com.cn> wrote:
> Hello, Trustin Lee, I'm busy recently,but I must ask you:can I keep some
> hope to find the performance problem in my server base mina? I write some
> code to test it,but not found how to do it.
>
> -----邮件原件-----
> 发件人: 李向锋 [mailto:lixiangfeng@infosec.com.cn]
> 发送时间: 2007年9月29日 14:06
> 收件人: 'trustin@gmail.com'
> 主题: reply: mina performance
>
> Hello,Trustin Lee, have you make some time to help me? Or give me some issue
> to use mina build a high performance server ?
>
> Thanks!
>
> -----邮件原件-----
> 发件人: Trustin Lee [mailto:]
> 发送时间: 2007年9月18日 11:56
> 收件人: dev@mina.apache.org
> 主题: Re: mina performance
>
> Ah, you attached the file already.  Let me check it out this week.
>
> Thanks,
> Trustin
>
> On 9/18/07, windshome <li...@infosec.com.cn> wrote:
> >
> > http://www.nabble.com/file/p12749102/severdemo.zip severdemo.zip
> >
> >
> >
> > Hello, I Write a Server Demo use Mina-1.1.2,use the
> > ObjectSerializationCodecFactory. But When Run This Server,Use a 100
> threads
> > Client to test it's performance,it's performance is poor. Server machine
> is
> > 2CPU *2.8G,1G memory ,Suse Linux  9. It Tran/sec only 60~80. I past the
> code
> > under, who can help me?
> >
> >
> >
> > Then,I Run the HttpServer exsample  from Mina1.1.2 in same machine, I use
> > the apche ab test it.When I use apace ab in 50 concurrency,it performance
> > Trans/Sec is 4800,but when I use 100 or more concurrency,it performance is
> > very poor, only 100~200 trans/sec. I cannot understand it ,who can tell me
> > why?
> >
> > --
> > View this message in context:
> http://www.nabble.com/mina-performance-tf4471354s16868.html#a12749102
> > Sent from the Apache MINA Support Forum mailing list archive at
> Nabble.com.
> >
> >
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>
>


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

Re: reply: mina performance

Posted by 李向锋 <li...@infosec.com.cn>.
Thanks. I will use other thread model and test it.

-----邮件原件-----
发件人: mat [mailto:forum.maillist@gmail.com] 
发送时间: 2007年10月22日 0:03
收件人: dev@mina.apache.org
主题: Re: 答复: reply: mina performance

Executors.newCachedThreadPool() is always preferred by IoService. What I
said was ExecutorFilter.

On 10/21/07, Brian McCallister <br...@skife.org> wrote:
>
>
> On Oct 19, 2007, at 9:23 PM, mat wrote:
>
> > Try to use FixedThreadPool instead of CachedThreadPool when add a
> > ExecutorFilter.
>
> This goes against the advice at
> http://mina.apache.org/configuring-thread-model.html
> :
>
> "Executors.newCachedThreadPool() is always preferred by IoService. It
> is because using other thread pool type can lead to unpredictable
> performance side effect in IoService. Once all threads in the pool
> become in use, IoService will start to block while it tries to acquire
> a thread from the pool and to start to show weird performance
> degradation, which is sometimes very hard to trace."
>
> ?
>
>
>


Re: 答复: reply: mina performance

Posted by mat <fo...@gmail.com>.
Executors.newCachedThreadPool() is always preferred by IoService. What I
said was ExecutorFilter.

On 10/21/07, Brian McCallister <br...@skife.org> wrote:
>
>
> On Oct 19, 2007, at 9:23 PM, mat wrote:
>
> > Try to use FixedThreadPool instead of CachedThreadPool when add a
> > ExecutorFilter.
>
> This goes against the advice at
> http://mina.apache.org/configuring-thread-model.html
> :
>
> "Executors.newCachedThreadPool() is always preferred by IoService. It
> is because using other thread pool type can lead to unpredictable
> performance side effect in IoService. Once all threads in the pool
> become in use, IoService will start to block while it tries to acquire
> a thread from the pool and to start to show weird performance
> degradation, which is sometimes very hard to trace."
>
> ?
>
>
>

Re: 答复: reply: mina performance

Posted by Brian McCallister <br...@skife.org>.
On Oct 19, 2007, at 9:23 PM, mat wrote:

> Try to use FixedThreadPool instead of CachedThreadPool when add a
> ExecutorFilter.

This goes against the advice at http://mina.apache.org/configuring-thread-model.html 
  :

"Executors.newCachedThreadPool() is always preferred by IoService. It  
is because using other thread pool type can lead to unpredictable  
performance side effect in IoService. Once all threads in the pool  
become in use, IoService will start to block while it tries to acquire  
a thread from the pool and to start to show weird performance  
degradation, which is sometimes very hard to trace."

?



Re: 答复: reply: mina performance

Posted by mat <fo...@gmail.com>.
In your server, I didn't find.

config.setThreadModel(ThreadModel.MANUAL);
ByteBuffer.setUseDirectBuffers(false);
ByteBuffer.setAllocator(new SimpleByteBufferAllocator());

Try to use FixedThreadPool instead of CachedThreadPool when add a
ExecutorFilter.

On 10/19/07, Trustin Lee <tr...@gmail.com> wrote:
>
> I am also very busy these days unfortunately.  Anyone who wants to help
> 向锋?
>
> Trustin
>
> On 10/19/07, 李向锋 <li...@infosec.com.cn> wrote:
> > Hello, Trustin Lee, I'm busy recently,but I must ask you:can I keep some
> > hope to find the performance problem in my server base mina? I write
> some
> > code to test it,but not found how to do it.
> >
> > -----邮件原件-----
> > 发件人: 李向锋 [mailto:lixiangfeng@infosec.com.cn]
> > 发送时间: 2007年9月29日 14:06
> > 收件人: 'trustin@gmail.com'
> > 主题: reply: mina performance
> >
> > Hello,Trustin Lee, have you make some time to help me? Or give me some
> issue
> > to use mina build a high performance server ?
> >
> > Thanks!
> >
> > -----邮件原件-----
> > 发件人: Trustin Lee [mailto:]
> > 发送时间: 2007年9月18日 11:56
> > 收件人: dev@mina.apache.org
> > 主题: Re: mina performance
> >
> > Ah, you attached the file already.  Let me check it out this week.
> >
> > Thanks,
> > Trustin
> >
> > On 9/18/07, windshome <li...@infosec.com.cn> wrote:
> > >
> > > http://www.nabble.com/file/p12749102/severdemo.zip severdemo.zip
> > >
> > >
> > >
> > > Hello, I Write a Server Demo use Mina-1.1.2,use the
> > > ObjectSerializationCodecFactory. But When Run This Server,Use a 100
> > threads
> > > Client to test it's performance,it's performance is poor. Server
> machine
> > is
> > > 2CPU *2.8G,1G memory ,Suse Linux  9. It Tran/sec only 60~80. I past
> the
> > code
> > > under, who can help me?
> > >
> > >
> > >
> > > Then,I Run the HttpServer exsample  from Mina1.1.2 in same machine, I
> use
> > > the apche ab test it.When I use apace ab in 50 concurrency,it
> performance
> > > Trans/Sec is 4800,but when I use 100 or more concurrency,it
> performance is
> > > very poor, only 100~200 trans/sec. I cannot understand it ,who can
> tell me
> > > why?
> > >
> > > --
> > > View this message in context:
> > http://www.nabble.com/mina-performance-tf4471354s16868.html#a12749102
> > > Sent from the Apache MINA Support Forum mailing list archive at
> > Nabble.com.
> > >
> > >
> >
> >
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> > --
> > PGP Key ID: 0x0255ECA6
> >
> >
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>