Re: [REVIEW] Re: Compression of full-page-writes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [REVIEW] Re: Compression of full-page-writes
Date: 2014-12-12 14:24:27
Message-ID: 20141212142427.GN19832@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 12, 2014 at 03:22:24PM +0100, Andres Freund wrote:
> On 2014-12-12 09:18:01 -0500, Bruce Momjian wrote:
> > On Fri, Dec 12, 2014 at 08:27:59AM -0500, Robert Haas wrote:
> > > On Thu, Dec 11, 2014 at 11:34 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > > >> compression = 'on' : 1838 secs
> > > >> = 'off' : 1701 secs
> > > >>
> > > >> Different is around 140 secs.
> > > >
> > > > OK, so the compression took 2x the cpu and was 8% slower. The only
> > > > benefit is WAL files are 35% smaller?
> > >
> > > Compression didn't take 2x the CPU. It increased user CPU from 354.20
> > > s to 562.67 s over the course of the run, so it took about 60% more
> > > CPU.
> > >
> > > But I wouldn't be too discouraged by that. At least AIUI, there are
> > > quite a number of users for whom WAL volume is a serious challenge,
> > > and they might be willing to pay that price to have less of it. Also,
> > > we have talked a number of times before about incorporating Snappy or
> > > LZ4, which I'm guessing would save a fair amount of CPU -- but the
> > > decision was made to leave that out of the first version, and just use
> > > pg_lz, to keep the initial patch simple. I think that was a good
> > > decision.
> >
> > Well, the larger question is why wouldn't we just have the user compress
> > the entire WAL file before archiving --- why have each backend do it?
> > Is it the write volume we are saving? I though this WAL compression
> > gave better performance in some cases.
>
> Err. Streaming?

Well, you can already set up SSL for compression while streaming. In
fact, I assume many are already using SSL for streaming as the majority
of SSL overhead is from connection start.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-12-12 14:26:17 Re: pg_rewind in contrib
Previous Message Peter Eisentraut 2014-12-12 14:23:32 Re: moving from contrib to bin