Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 955D19FE16B for ; Thu, 14 Jun 2012 16:56:15 -0300 (ADT) Received: from mh5.mail.rice.edu ([128.42.199.32]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SfG9O-0002mS-H9 for pgsql-hackers@postgresql.org; Thu, 14 Jun 2012 19:56:14 +0000 Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id 19DF62910FB; Thu, 14 Jun 2012 14:56:02 -0500 (CDT) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id 08664291129; Thu, 14 Jun 2012 14:56:02 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh5.mail.rice.edu, auth channel Received: from mh5.mail.rice.edu ([127.0.0.1]) by mh5.mail.rice.edu (mh5.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 4V6Jw2R7+wC9; Thu, 14 Jun 2012 14:56:01 -0500 (CDT) X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.rice.edu (aart.rice.edu [168.7.56.48]) by mh5.mail.rice.edu (Postfix) with ESMTP id C383F291121; Thu, 14 Jun 2012 14:56:01 -0500 (CDT) Received: by aart.rice.edu (Postfix, from userid 18612) id A0C0010026B; Thu, 14 Jun 2012 14:56:01 -0500 (CDT) Date: Thu, 14 Jun 2012 14:56:01 -0500 From: "ktm@rice.edu" To: Merlin Moncure Cc: Tom Lane , Euler Taveira , Pgsql Hackers Subject: Re: libpq compression Message-ID: <20120614195601.GD6547@aart.rice.edu> References: <4FD9698F.2090407@timbira.com> <29853.1339651170@sss.pgh.pa.us> <4FD9E70B.9040607@timbira.com> <11502.1339699384@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201206/678 X-Sequence-Number: 209518 On Thu, Jun 14, 2012 at 02:38:02PM -0500, Merlin Moncure wrote: > On Thu, Jun 14, 2012 at 1:43 PM, Tom Lane wrote: > > So I've got very little patience with the idea of "let's put in some > > hooks and then great things will happen". =A0It would be far better a= ll > > around if we supported exactly one, well-chosen, method. =A0But reall= y > > I still don't see a reason not to let openssl do it for us. >=20 > Well, for toast compression the right choice is definitely one of the > lz based algorithms (not libz!). For transport compression you have > the case of sending large data over very slow and/or expensive links > in which case you want to use bzip type methods. But in the majority > of cases I'd probably be using lz there too. So if I had to pick just > one, there you go. But which one? the lz algorithm with arguably the > best pedigree (lzo) is gnu but there are many other decent candidates, > some of which have really tiny implementations. >=20 > merlin >=20 +1 for a very fast compressor/de-compressor. lz4 from Google has a BSD license and at 8.5X faster compression than zlib(-1) and 5X faster de-compression the zlib (-1), 2X faster than LZO even would be my pick.=20 Regards, Ken