RE: Proposal for Updating CRC32C with AVX-512 Algorithm.
Amonson, Paul D <paul.d.amonson@intel.com>
From: "Amonson, Paul D" <paul.d.amonson@intel.com>
To: "Amonson, Paul D" <paul.d.amonson@intel.com>, Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Andres Freund <andres@anarazel.de>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Nathan Bossart <nathandbossart@gmail.com>, "Shankaran, Akash" <akash.shankaran@intel.com>
Date: 2024-08-22T15:14:32Z
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 →
-
Compute CRC32C using AVX-512 instructions where available
- 3c6e8c123896 18.0 landed
Attachments
- 0001-v2-Refactor-Move-all-HW-checks-to-common-file.patch (application/octet-stream) patch v2-0001
- 0002-v2-Feat-Add-support-for-the-SIMD-AVX-512-crc32c-algorit.patch (application/octet-stream) patch v2-0002
Hi, Here are the latest patches for the accelerated CRC32c algorithm. I did the following to create these refactored patches: 1) From the main branch I moved all x86_64 hardware checks from the various locations into a single location. I did not move any ARM tests as I would have no way to test them for validity. However, an ARM section could be added to my consolidated source files. Once I had this working and verified that there were no regressions.... 2) I ported the AVX-512 crc32c code as a second patch adding the new HW checks into the previously created file for HW checks from patch 0001. 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. Please review the attached patches. Thanks, Paul