pecl-networking-ssh2 icon indicating copy to clipboard operation
pecl-networking-ssh2 copied to clipboard

Performance issues

Open AnAnalogGuy opened this issue 1 year ago • 0 comments

Hi all

I’m struggling with performance issues.

Same file, same server system (Ubuntu), same client system (Ubuntu), same network connection, only difference is the transfer protocol.

File to download: Size: 33.6 MB Type: Zip file

Download time with ssh2/sftp: 45 sec with wget/https: 1.6 sec with openssh-client/sftp: 6 sec

That’s quite a huge difference!

The data is received in 4314 buffers, which indicates the chunk size the server is using to transfer data is 8k (33.6 * 1024 * 1024 / 4314). I played around with the buffer_size of the input stream but no improvement was achived.

ssh2 version 1.4.1 with PHP 8.1.29 on Ubuntu.

The results make me conclude the problem can’t be sftp as such nor the server nor the network. So it’s probably me :-) Is there anything performance-wise I’m missing? Something in need to tweak in the PHP configuration? …. ? Or is this what has to be expected?

Thanks a lot for your support. Mark

AnAnalogGuy avatar Oct 04 '24 12:10 AnAnalogGuy