On 4/6/21 10:04 PM, Damien Miller wrote:> On Tue, 6 Apr 2021, rapier wrote:
>
>> Looking at the performance - on my systems sftp seems to be a bit
slower
>> than scp when dealing with a lot of small files. Not sure why this is
>> the case as I haven't looked at the sftp code in years.
>
> the OpenSSH sftp client doesn't do inter-file pipelining - it only
> pipelines read/writes within a transfer, so each new file causes a
> stall.
>
> This is all completely fixable on the client side, and shouldn't apply
> to things like sshfs at all.
Gotcha. Is this because of how it sequentially loops through the
readdirs in two _dir_internal functions? If so I'm wondering if you
could spawn per file threads to get some concurrency within a directory.
Just curious and this is the first time I've looked at the sftp code in
years. I hope you don't mind the questions.
Chris