Why is the Dropbear SCP server so slow?

I have a USB 3.0 flash drive with maximum sequential write speed around 32MiB/s. Using Samba and trying to upload a 2GiB file to it, the speed is always at maximum. But if I use WinSCP and upload the file (to the same USB mount point, not the onboard flash) to the build-in Dropbear SCP server, the speed is somewhere like 2.6MiB/s. Why is it so slow? I thought of encryption, but my device is a Newifi D2, which has a pretty powerful CPU.

What does top or htop report on cpu usage when you copy the file?

1 Like

When uploading files using SMB:

I don't really understand why smbd uses 26% CPU time while the CPU utilization at the top left corner reads 0%.

And here is what it looks like when uploading using SCP:

28% means it consumes 100% CPU time on 1 out of 4 cores. But my CPU only has 2 cores. Don't understand it either.

This is the user processes. smbd will fall under system processes.

Most likely with hyperthreading they are multiplied by 2 and you have 4 virtual cores.

The other thing that might limit you is whether scp can use multiple cores. If I remember from previous similar threads, it cannot.