You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Kenji Hollis (JIRA)" <ji...@apache.org> on 2007/06/19 18:02:26 UTC

[jira] Commented: (DIRMINA-364) Include Runtime.getRuntime().availableProcessors() into the constructors of SocketAcceptor

    [ https://issues.apache.org/jira/browse/DIRMINA-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506225 ] 

Kenji Hollis commented on DIRMINA-364:
--------------------------------------

I propose:

(Runtime.getRuntime().availableProcessors() + 1)

As this is what the tuning guide has recommended.  This number has been a good number for me, and I've found it to be fairly accurate when starting the SocketAcceptor.

Of course, this can be tuned through the configuration factory bean, but this seems like a good starting point number for the SocketAcceptor.

> Include Runtime.getRuntime().availableProcessors() into the constructors of SocketAcceptor
> ------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-364
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-364
>             Project: MINA
>          Issue Type: Improvement
>          Components: Transport
>    Affects Versions: 2.0.0-M1
>            Reporter: im-james
>            Priority: Trivial
>             Fix For: 2.0.0-M1
>
>
> I propose to change the default constructor of SocketAcceptor for this :
> public SocketAcceptor() {
>         this(Runtime.getRuntime().availableProcessors(), new NewThreadExecutor());
> }
> And to add a new constructor:
> public SocketAcceptor(Executor executor) {
>         this(Runtime.getRuntime().availableProcessors(), executor);
> }
> The objective is to maximize the performance of MINA in the usual cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (DIRMINA-364) Include Runtime.getRuntime().availableProcessors() into the constructors of SocketAcceptor

Posted by Mark Webb <el...@gmail.com>.
Thanks for pointing this out.  The change has been made.

On 6/19/07, Kenji Hollis (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/DIRMINA-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506225]
>
> Kenji Hollis commented on DIRMINA-364:
> --------------------------------------
>
> I propose:
>
> (Runtime.getRuntime().availableProcessors() + 1)
>
> As this is what the tuning guide has recommended.  This number has been a
> good number for me, and I've found it to be fairly accurate when starting
> the SocketAcceptor.
>
> Of course, this can be tuned through the configuration factory bean, but
> this seems like a good starting point number for the SocketAcceptor.
>
> > Include Runtime.getRuntime().availableProcessors() into the constructors
> of SocketAcceptor
> >
> ------------------------------------------------------------------------------------------
> >
> >                 Key: DIRMINA-364
> >                 URL: https://issues.apache.org/jira/browse/DIRMINA-364
> >             Project: MINA
> >          Issue Type: Improvement
> >          Components: Transport
> >    Affects Versions: 2.0.0-M1
> >            Reporter: im-james
> >            Priority: Trivial
> >             Fix For: 2.0.0-M1
> >
> >
> > I propose to change the default constructor of SocketAcceptor for this :
> > public SocketAcceptor() {
> >         this(Runtime.getRuntime().availableProcessors(), new
> NewThreadExecutor());
> > }
> > And to add a new constructor:
> > public SocketAcceptor(Executor executor) {
> >         this(Runtime.getRuntime().availableProcessors(), executor);
> > }
> > The objective is to maximize the performance of MINA in the usual cases.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
..Cheers
Mark