You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Susmit Sarkar (Jira)" <ji...@apache.org> on 2021/04/13 11:44:00 UTC

[jira] [Comment Edited] (SSHD-1153) NIO2 IOServiceFactory, NIO Worker Threads and the performance

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

Susmit Sarkar edited comment on SSHD-1153 at 4/13/21, 11:43 AM:
----------------------------------------------------------------

[~johnnyv] - I was checking through the thread dumps. I found out *5 Nio2 worker* threads, (1+cores in my machine), and I opened parallel 100 ssh connections, all those 100 ssh connections were being triggered by the 100 individual thread 

*sshd-SftpSubsystem-thread-1*

*My question for my knowledge is:*

 
 # *What are the NIO2 worker threads, and how do they differ from* *sshd-SftpSubsystem-thread-1, as we see most of the work is done by the latter then what is the role of nio-worker thread***
 # *Does increase the nio-worker thread count to 9,10 will increase the throughput (we tried but we didn't found any negligible changes, what will be the best optimum value recommended to be used?)*
 # *What are the*
 IoServiceFactoryFactory ==> *NIO2, MINA, NETTY*

How does this works internally, and how performance will be affected with the different *IoServiceFactoryFactory*.

*I am sorry if I am disturbing you as I am not getting proper docs on how it's working internally so thought of asking you.*

 

*On a small note we are seeing an improvement of 20 percent compared to legacy maverick server with Apache Mina Library.*

Shall be grateful if you can help with the above answers.

 


was (Author: susmit07):
[~johnnyv] - I was checking through the thread dumps. I found out *5 Nio2 worker* threads, (1+cores in my machine), and I opened parallel 100 ssh connections, all those 100 ssh connections were being triggered by the 100 individual thread 

*sshd-SftpSubsystem-thread-1*

*My question for my knowledge is:*

 
 # *What are the NIO2 worker threads, and how do they differ from* *sshd-SftpSubsystem-thread-1, as we see most of the work is done by the latter then what is the role of nio-worker thread***
 # *Does increase the performance to 9,10 will increase the throughput (we tried but we didn't found any negligible changes, what will be the best optimum value recommended to be used?)*
 # *What are the*
IoServiceFactoryFactory ==> *NIO2, MINA, NETTY*

How does this works internally, and how performance will be affected with the different *IoServiceFactoryFactory*.

*I am sorry if I am disturbing you as I am not getting proper docs on how it's working internally so thought of asking you.*

 

*On a small note we are seeing an improvement of 20 percent compared to legacy maverick server with Apache Mina Library.*

Shall be grateful if you can help with the above answers.

 

> NIO2 IOServiceFactory, NIO Worker Threads and the performance
> -------------------------------------------------------------
>
>                 Key: SSHD-1153
>                 URL: https://issues.apache.org/jira/browse/SSHD-1153
>             Project: MINA SSHD
>          Issue Type: Question
>            Reporter: Susmit Sarkar
>            Assignee: Jonathan Valliere
>            Priority: Minor
>         Attachments: image-2021-03-29-23-52-39-814.png, image-2021-03-29-23-54-01-301.png, image-2021-03-29-23-55-16-337.png, image-2021-03-29-23-55-33-299.png
>
>
> IoServiceFactoryFactory ==> *NIO2, MINA, NETTY*
> How does this works internally, and how performance will be affected with the different IoServiceFactoryFactory.
> We did lots of performance testing and found NIO2 is the best performing of the 3? Why is it the best of the other 2, and why Apache selects it as default. (Tested with 50-75 concurrent threads. Did 2 types of test *[1.] PUT for 1.5kb files for 75 concurrent threads [2.] PUT for 100 MB files for 40-50 concurrent threads*)
> How do NIO Worker Threads affect the performance? Attaching a screenshot from the thread dump which I took
> !image-2021-03-29-23-52-39-814.png!
> All the threads in park state and some are runnable in different phases of execution. I am not able to decipher what does the stacks mean:
> The details which I got are (*PARKED*):
>  !image-2021-03-29-23-54-01-301.png!
> For *RUNNABLE:*
> *!image-2021-03-29-23-55-33-299.png!*
> *Lastly, I want to bring this to notice not all threads are used out of 75 threads I see 50 to be in runnable and the remaining 25 to be in the parked state, is it the expected behavior?*
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org