Re: Proposal for Updating CRC32C with AVX-512 Algorithm. - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
Date
Msg-id 5rnt26xcnd6flvnahyr37kozdiagfj5cczsmolu722ccfgeyy3@3yj5crjnf3o5
Whole thread Raw
In response to Re: Proposal for Updating CRC32C with AVX-512 Algorithm.  (John Naylor <johncnaylorls@gmail.com>)
Responses Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
List pgsql-hackers
Hi,

On 2024-12-12 18:32:20 +0700, John Naylor wrote:
> I went and looked at the Chromium source, and found the following
> snippet that uses the same technique, but only requires 128-bit CLMUL
> and has a minimum input size of 64 bytes, rather than 256. This seems
> like it might be better suited for shorter inputs. Also seems much
> easier than trying to get the AVX-512 hippo to dance. It uses the IEEE
> polynomial, so would need new constants calculated for ours, but that
> had to be done for the shared patch, too.

Frankly, we should just move away from using CRCs. They're good for cases
where short runs of bit flips are much more likely than other kinds of errors
and where the amount of data covered by them has a low upper bound. That's not
at all the case for WAL records. It'd not matter too much if CRCs were cheap
to compute - but they aren't.  We should instead move to some more generic
hashing algorithm, decent ones are much faster.

Greetings,

Andres



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Next
From: Nathan Bossart
Date:
Subject: Re: .ready and .done files considered harmful