You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Zhenliang Su (JIRA)" <ji...@apache.org> on 2018/03/28 02:13:00 UTC

[jira] [Comment Edited] (SSHD-812) support asynchronization mode for sftp subsystem

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

Zhenliang Su edited comment on SSHD-812 at 3/28/18 2:12 AM:
------------------------------------------------------------

Thanks for your guide.:)

I analyzed the behavior of the filezilla client. When it want to read a file from sftp server, it send multiple SSH_FXP_READ request packet with different id and offset field before any SSH_FXP_DATA packet response. It want to read multiple block at the same time, not one by one, but `SftpSubsystem` have to process each request one by one. I think this is the bottleneck.

!doRead.png!

 

When processing SSH_FXP_READ or SSH_FXP_WRITE request, we can associate each reply to an SFTP command through `id` field.

 


was (Author: smoking):
Thanks for your guide.:)

I analyzed the behavior of the filezilla client. When it want to read a file from sftp server, it send multiple SSH_FXP_READ request packet with different id and offset field before any SSH_FXP_DATA packet response. It want to read multiple block at the same time, not one by one, but `SftpSubsystem` have to process each request one by one. I think this is the bottleneck.

!doRead.png!

 

When processing SSH_FXP_READ or SSH_FXP_WRITE request, we can associate each reply to an SFTP command through `id` field.

 

> support asynchronization mode for sftp subsystem
> ------------------------------------------------
>
>                 Key: SSHD-812
>                 URL: https://issues.apache.org/jira/browse/SSHD-812
>             Project: MINA SSHD
>          Issue Type: New Feature
>    Affects Versions: 1.7.0
>         Environment: java1.8, linux
>            Reporter: Zhenliang Su
>            Assignee: Goldstein Lyor
>            Priority: Major
>              Labels: asynchronous, sftp
>         Attachments: Main.java, doRead.png
>
>
> I used SSHD as a middleman between client and target sftp server.
> I found that, when filezilla client directly connect to the target sftp server, it transfers fast. When filezilla client connect to the middleman, it transfers slow.
> I analyzed the source code of org.apache.sshd.server.subsystem.sftp.SftpSubsystem#doRead, and I found it behaves like block mode, and client's other SSH_FXP_READ request blocked in the same thread.
>  
> my middleman code:
>  [^Main.java]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)