Re: Proposal for enabling auto-vectorization for checksum calculations

From: Matthew Sterrett <matthewsterrett2(at)gmail(dot)com>
To: Stepan Neretin <slpmcf(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, "Devulapalli, Raghuveer" <raghuveer(dot)devulapalli(at)intel(dot)com>, "Shankaran, Akash" <akash(dot)shankaran(at)intel(dot)com>
Subject: Re: Proposal for enabling auto-vectorization for checksum calculations
Date: 2025-05-19 23:54:09
Message-ID: CA+vA858b4J1k_34vRR+=UsM5U4JSVc4QkigHExk0RYH9nk3iRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello! Thanks for helping me with this.
I'm still trying to figure out what is going on with the Bookworm test
failures. I'm pretty sure this patchset should resolve all the issues
with the macOS build, but I don't think it will help the linux
failures unfortunately.

On Sat, May 10, 2025 at 4:02 AM Stepan Neretin <slpmcf(at)gmail(dot)com> wrote:
>
>
>
> On Sat, May 10, 2025 at 6:01 PM Stepan Neretin <slpmcf(at)gmail(dot)com> wrote:
>>
>>
>>
>> On Thu, May 8, 2025 at 6:57 AM Matthew Sterrett <matthewsterrett2(at)gmail(dot)com> wrote:
>>>
>>> Hello! I'm still trying to figure out those CI failures, I just wanted
>>> to update things.
>>>
>>> From my testing, with this patch repeatedly disabling/enabling
>>> checksums is about 12.4% on an approximately 15 GB database.
>>>
>>> By the way, I'd love it if anyone could help me figure out how to
>>> replicate a CI failure in the Cirrus CI.
>>> I haven't been able to figure out how to test CI runs locally, does
>>> anyone know a good method to do that?
>>>
>>>
>>
>> Hi Matthew,
>>
>> Thanks for the patch!
>>
>> I ran some timing tests:
>>
>> (without avx2)
>>
>> Time: 4034.351 ms
>> SELECT drive_pg_checksum(512);
>>
>> (with avx2)
>>
>> Time: 3559.076 ms
>> SELECT drive_pg_checksum(512);
>>
>> Also attached two patches that should fix the CI issues.
>>
>> Best,
>>
>> Stepan Neretin
>>
>>
>>
>
> Oops, forgot to attach patches :)
>
> Best,
>
> Stepan Neretin
>
>

Attachment Content-Type Size
v3-0002-Fix-compilation-on-systems-where-immintrin.h-is-n.patch application/octet-stream 1.1 KB
v3-0005-Use-dummy-function-to-avoid-linker-error-move-dec.patch application/octet-stream 1.9 KB
v3-0004-fix-bench-compiling.patch application/octet-stream 692 bytes
v3-0003-Benchmark-code-for-postgres-checksums.patch application/octet-stream 4.7 KB
v3-0001-Enable-autovectorizing-pg_checksum_block.patch application/octet-stream 10.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-05-20 00:21:46 Re: strange perf regression with data checksums
Previous Message Michael Paquier 2025-05-19 23:38:47 Re: Regression in statement locations