Re: Eagerly evict bulkwrite strategy ring - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Eagerly evict bulkwrite strategy ring
Date
Msg-id CAAKRu_a=+jwQDUYkoC=nWz6Ky6CGgE-ZW1XzfYaeFrQEC6+iaw@mail.gmail.com
Whole thread Raw
In response to Re: Eagerly evict bulkwrite strategy ring  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: Eagerly evict bulkwrite strategy ring
List pgsql-hackers
On Mon, Aug 25, 2025 at 3:03 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
>
> I just finished a draft of a patch set to do write combining for COPY
> FROM using this same heuristic as this patch for deciding to eagerly
> flush but then combining multiple buffers into a single IO. That has
> larger performance gains, so one could argue to wait to do that.

Attached v3 uses the same code structure as in the checkpointer write
combining thread [1]. I need the refactoring of FlushBuffer() now
included in this set to do the write combining in checkpointer. Upon
testing, I did notice that write combining seemed to have little
effect on COPY FROM beyond what eagerly flushing the buffers in the
ring has. The bottleneck is WAL IO and CPU. While we will need the
COPY FROM write combining to use direct IO, perhaps it is not worth
committing it just yet. For now, this thread remains limited to
eagerly flushing buffers in the BAS_BULKWRITE strategy ring.

- Melanie

[1] https://www.postgresql.org/message-id/flat/CAAKRu_bcWRvRwZUop_d9vzF9nHAiT%2B-uPzkJ%3DS3ShZ1GqeAYOw%40mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Next
From: Melanie Plageman
Date:
Subject: Re: Checkpointer write combining