[ 
https://issues.apache.org/jira/browse/SSHD-1135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17293009#comment-17293009
 ] 

Lyor Goldstein commented on SSHD-1135:
--------------------------------------

{quote}Once a socket has either been accepted or connected, the socket is 
registered with a transfer thread
{quote}
I think this is incorrect - the socket is not registered with any specific 
thread. There is a pool of thread along with an _Executor_ that assigns a 
thread from it to serve a socket when data is detected on it. On the data has 
been handled, the thread returns to the pool and is ready to serve some (maybe) 
other socket.
{quote}I know if we use socketImplementation default (NIO2) there is a 
configuration value called nio-workers. Will it serve our purpose?
{quote}
If I understand correctly the question then yes...
{quote}And if so what are the upper boundary limits for the value nio-worker
 (Property.integer("nio-workers", Runtime.getRuntime().availableProcessors() + 
X)
{quote}
Something like that, although difficult to say how large _X_ should be. While 
the threads are mostly stuck on I/O to/from the socket, if there are too many 
of them then the context switching overhead becomes a factor. Also, it depends 
a lot on the traffic - if it is light, then no need for many threads.

> Configurable sshd transfer threads
> ----------------------------------
>
>                 Key: SSHD-1135
>                 URL: https://issues.apache.org/jira/browse/SSHD-1135
>             Project: MINA SSHD
>          Issue Type: Question
>            Reporter: Susmit Sarkar
>            Priority: Critical
>
> Set the number of transfer threads. Once a socket has either been accepted or 
> connected, the socket is registered with a transfer thread. This thread 
> asynchronously performs all the IO for the socket. If all the permanent 
> threads become fully loaded then additional threads will be created to handle 
> additional connections and shutdown once they have no sockets to service.
>   
>  Is there any performance tuning parameter that we can use to leverage our 
> above use case?
> I know if we use socketImplementation default (NIO2) there is a configuration 
> value called {{nio-workers. Will it serve our purpose?}}
> And if so what are the upper boundary limits for the value nio-worker
>  
> (Property.integer("nio-workers", Runtime.getRuntime().availableProcessors() + 
> X)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to