Re: WAL CPU overhead/optimization (was Master-slave visibility order)

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Ants Aasma <ants(at)cybertec(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WAL CPU overhead/optimization (was Master-slave visibility order)
Date: 2013-09-03 22:47:37
Message-ID: 20130903224737.GF7018@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-09-03 23:25:01 +0200, Hannu Krosing wrote:
> On 09/03/2013 05:27 PM, Robert Haas wrote:
> > On Thu, Aug 29, 2013 at 8:22 PM, Ants Aasma <ants(at)cybertec(dot)at> wrote:
> >> I might give it a shot later this cycle as I have familiarized my self
> >> with the problem domain anyway. I understand the appeal of staying
> >> with what we have, but this would cap the speedup at 4x and has large
> >> caveats with the extra lookup tables. A 28x speedup might be worth the
> >> extra effort.
> > I agree. However, on the flip side, a bird in the hand is worth two
> > in the bush. A patch that just does the same thing faster is likely
> > to be less controversial than changing the algorithm, and does not
> > preclude changing the algorithm later.
> >
> Has anybody looked at the recent i5/i7 added hrdware support for CRC32 ?
>
> http://www.strchr.com/crc32_popcnt
>
> From number there it is probably still slower than xxhash, but it might
> be worth doing as
> an interim optimisation.

Yes. There's two problems: For one they use a different polynom
(castagnoli afair), so the results aren't compatible with ones we
compute so far. For another, you need runtime detection of whether the
instruction is available and you need some compiler specific things to
use it.
Neither is too hard to solve, but I think that amount of work is better
spent using a different hash.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-09-03 23:10:46 Re: logical changeset generation v5
Previous Message Andres Freund 2013-09-03 22:41:27 Re: Backup throttling