SFTP is much slower than Samba

I've been using Samba4 on u7621 and I get around 100mb/s read speed.
I just learned about SFTP and decided to gave it a try since it's a lot smaller.
Installed openssh-sftp-server. It barely hit 5-6mb/s whereas samba4 reaches 100mb/s
Am doing something wrong or sftp is renowned for being slow?

I suspect it's also based on which cipher is used. Most embedded boxes aren't build for performing heavy crypto fast... At least it would be my first step to verify which cipher is used.

I'll try with a less cpu intensive encryption, any recommendation?

Try ksmbd instead of samba ?

I tried, I was as slow as sftp. may be ksmbd also uses encryption?

debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none

Probably.

Could perhaps make it run with legacy protocol (insecure), if you enable SMBv1 in the clients.

1 Like