www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples

Archive Index This month's Index

Subject: Re: Disabling compression by API?

Re: Disabling compression by API?

From: Aris Adamantiadis <aris_at_0xbadc0de.be>
Date: Fri, 08 Oct 2010 20:20:54 +0200

Hi,

OpenSSH's man page tell this:
        tocol version 1. Compression is desirable on modem lines and
        other slow connections, but will only slow down things on fast
        networks. The default value can be set on a host-by-host basis
        in the configuration files; see the Compression option.
The idea is that interactive sessions send a lot of small packets (<8
bytes) which are padded to blocksize (32 bytes for AES256) and then
have an additional 20 bytes for the HMAC.
While compression may enhance the throughput when used with large
packets and on slow networks, it adds latency which may not be
desirable for interactive sessions, with a marginal benefit (ethernet
frames take a fixed amount of bytes per packet on anyway).
My opinion is that compression is useful when transferring files of
unknown type, or mainly text files. Some content with high entropy
(compressed files, video, ...) are slow to compress and decompress ; If
there is an API call do enable/disable it (libssh does), everybody
should be happy.

Aris

Le 08/10/10 20:09, Jose Baars a écrit :
> Op 10/8/2010 7:53 PM, Daniel Stenberg schreef:
>> As for what default to use, I would love to hear some more opinions!
>
> My vote is for default on. As compression usually will shrink the data
> to about
> half, the CPU spent on compression will partly be earned back by having to
> encrypt only half of the data. In normal situations you would always want
> to use compression to lessen the burden on the network, and to avoid having
> to compress files or data separately.
>
> Just my view.
>
> Regards,
> Jose
>
>
>
>
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-10-08

the libssh2 team