Cost of XLogInsert CRC calculations - Mailing list pgsql-hackers

From tzirechnoy@hotpop.com
Subject Cost of XLogInsert CRC calculations
Date
Msg-id 20050309081325.GA2573462@krondor.astelecom.ru
Whole thread Raw
In response to Re: Cost of XLogInsert CRC calculations  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
On Mon, Mar 07, 2005 at 11:53:59PM +0000, Simon Riggs wrote:
> On Mon, 2005-03-07 at 09:39 -0500, Tom Lane wrote:
> > "Mark Cave-Ayland" <m.cave-ayland@webbased.co.uk> writes:

[skipped]

> Well, we're using the CRC in 3 separate places...
> (1) for xlog records
> (2) for complete blocks copied to xlog
> (3) for control files
> 
> For (1), records are so short that probably CRC16 would be sufficient
> without increasing the error rate noticeably.
> 
> I think I'd like to keep (3) at CRC64...its just too important. Plus
> thats slightly less code to change.
> 
> My money is on (2) being the source of most of that run-time anyway,
> since when we enclose a whole block it takes a lot longer to CRC64 all
> BLCKSZ bytes than it would do to CRC a single record in (1). But of
> course, longer stretches of data need better error detection rates.
Well, if there is no need for error recovery, than
what about using more simple algorithm, like checksum? Perhaps,
it even could be attached to one of required memcpy calls.




pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Current CVS parallel test lock
Next
From: Jeff Davis
Date:
Subject: Re: About b-tree usage