ZSTD compression support for OpenSSH

openssh at ml.breakpoint.cc openssh at ml.breakpoint.cc
Wed Mar 25 10:03:39 AEDT 2020

I hacked zstd support into OpenSSH a while ago and just started to clean
it up in the recent days. The cleanup includes configuration support
among other things that I did not have.

During testing I noticed the following differences compared to zlib:
- highly interactive shell output (as in refreshed at a _very_ high
  rate) may result in higher bandwidth compared to zlib. Since zstd is
  quicker in compressing, the shell output is blocked for less time and
  able create more output.

- small packages (a key stroke, keep-alive package) is compressed
  worse by zstd. A key takes ~10 bytes of raw data, zstd compression
  here is usually also 10 bytes - zlib's output is about 5 bytes. With
  the crypto overhead on top (block size, padding, MAC) the transferred
  size is the same.
  I added some prints in the initial version for comparing. The series
  adds the `S' escape key which dumps some statistics.

Is this something in the "might be accepted" category or more "we don't
need yet another compression algorithms"?


More information about the openssh-unix-dev mailing list