You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Alexey Polbitsyn (JIRA)" <ji...@apache.org> on 2011/07/02 18:52:21 UTC

[jira] [Issue Comment Edited] (SSHD-136) Reduce consumption of ClientInputStreamPump threads and NioProcessor threads.

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

Alexey Polbitsyn edited comment on SSHD-136 at 7/2/11 4:50 PM:
---------------------------------------------------------------

possible solution:

src-diff - diff files
src - sources

the ability to customize  count of NioProcessor threads before start SshClient:
	SshClient.setNioProcessorCount
the ability to customize  count of ClientInputStreamPump threads.
	1) 1 ClientInputStreamPump on channel
	2) 1 client ClientInputStreamPump on session
	3) 1 client ClientInputStreamPump on SshClient
	4) turn off automatically pumping

public enum PumpingMethod
{
    SELF,/* class will pump streams/stream */
	PARENT,/* delegating pumping to parent code(session for channel,client for session,external code for client)
	OFF /* torn off auto pumping  */
}

add public API to channel, session and client:
public boolean pump(); // try to pump input stream for channel, pump all channels with PumpingMethod=PARENT for session, pump all sessions with PumpingMethod=PARENT for client. Return true if at least one stream was pumped.
public void setPumpingMethod(PumpingMethod pumpingMethod) - set pumping method
public PumpingMethod getPumpingMethod()


add implementation for SshClient pumping:
use one thread for pumping all sessions with PumpingMethod=PARENT and accordingly all channels with PumpingMethod=PARENT

      was (Author: polbitsyn):
    src-diff - diff files
src - sources

  
> Reduce consumption of ClientInputStreamPump threads and NioProcessor threads. 
> ------------------------------------------------------------------------------
>
>                 Key: SSHD-136
>                 URL: https://issues.apache.org/jira/browse/SSHD-136
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Alexey Polbitsyn
>         Attachments: src-diff.zip, src.zip
>
>
> When using the library  to work with 1000 concurrent ssh connections, it takes 1000 ClientInputStreamPump threads and it can. 1 thread for 1 channel. It would be nice to be able to configure this behavior, for example use 1 ClientInputStreamPump for all channels of sshclient or session.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira