Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: "Amonson, Paul D" <paul.d.amonson@intel.com>
Cc: Bruce Momjian <bruce@momjian.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andres Freund <andres@anarazel.de>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "Shankaran, Akash" <akash.shankaran@intel.com>
Date: 2024-08-22T15:29:00Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Compute CRC32C using AVX-512 instructions where available

Thanks for the new patches.

On Thu, Aug 22, 2024 at 03:14:32PM +0000, Amonson, Paul D wrote:
> I reran all the basic tests again to make sure that the performance
> numbers were within the margin of error when compared to my original
> finding. This step showed similar numbers (see origin post) around 1.45X
> on average. I also made sure that if compiled with the AVX-512 features
> and ran on HW without these features the Postgres server still worked
> without throwing illegal instruction exceptions.

Upthread [0], Andres suggested dispatching to a different implementation
for compile-time-known small lengths.  Have you looked into that?  In your
original post, you noted a 14% regression for records smaller than 256
bytes, which is not an uncommon case for Postgres.  IMO we should try to
mitigate that as much as possible.

[0] https://postgr.es/m/20240612201135.kk77tiqcux77lgev%40awork3.anarazel.de

-- 
nathan