Re: Enabling Checksums

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: Daniel Farina <daniel(at)heroku(dot)com>
Cc: Ants Aasma <ants(at)cybertec(dot)at>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Enabling Checksums
Date: 2013-03-20 00:03:35
Message-ID: 5148FCD7.2030703@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/19/13 7:13 PM, Daniel Farina wrote:
> I'm confused. Postgres includes a CRC32 implementation for WAL, does
> it not? Are you referring to something else?

I'm just pointing out that zlib includes one, too, and they might be
more motivated/able as a project to chase after Intel's hardware
acceleration for CRCs one day. They already have code switching from C
to assembly to get extra performance out of their longest_match()
function. The PostgreSQL CRC code is unlikely to go into twiddling
assembly code, but zlib--which is usually linked in anyway--will.

And Adler-32 isn't just an option, it's named after a dude who works on
zlib, and I can see he's already playing with the Intel acceleration by
some of his recent answers at
http://stackoverflow.com/users/1180620/mark-adler

I just re-discovered Ross Williams' CRC guide, which was already
referenced in pg_crc_tables.h, so I think I'm getting close to being
caught up on all the options here. Simon suggested the other day that
we should make the exact checksum mechanism used pluggable at initdb
time, just some last minute alternatives checking on the performance of
the real server code. I've now got the WAL CRC32, the zlib CRC32, and
the Intel-derived versions Ants hacked on to compare.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2013-03-20 00:11:13 Re: Enabling Checksums
Previous Message Andrew Dunstan 2013-03-19 23:22:24 Re: Enabling Checksums