| From: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
|---|---|
| To: | Tomas Vondra <tomas(at)vondra(dot)me> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Andres Freund <andres(at)anarazel(dot)de> |
| Subject: | Re: read stream: Backward I/O combining |
| Date: | 2026-07-24 08:07:26 |
| Message-ID: | CAN55FZ0U-q_qvb6-YG=V6Vp6SDX2gY-4D60SuZk3ObJ--JYhEw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Mon, 20 Jul 2026 at 17:57, Tomas Vondra <tomas(at)vondra(dot)me> wrote:
>
> Thanks for the patch. I got this patch a couple days/week ago, as part
> of the work on index prefetching. So I got to do a bit of benchmarking.
>
> The pattern is pretty clear. The DESC (backward access) is much slower,
> hence the huge area of red results for runs without index prefetch.
>
> The index prefetch helps quite a bit, with ~5x speedup, which is nice.
> But it's still ~5x slower than the ASC case. The combining gets us to
> ~1.5x compared to master/ASC for all the tested SSD devices etc.
>
> So I think this works pretty well, and it largely addresses the issue
> with backward access.
Thanks for looking into this and thanks for the benchmarks, they are
very helpful!
After an off-list discussion with Andres, we decided it would be
better to share this patch as a version that applies cleanly on top of
master. Although this patch is an index-prefetching specific patch, it
can be tested by the test_aio infrastructure and also can be
benchmarked by the same infrastructure (as done in 0002). So, here is
a v2 which applies cleanly on top of master.
--
Regards,
Nazir Bilal Yavuz
Microsoft
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Add-read-stream-backwards-I-O-combining.patch | text/x-patch | 42.8 KB |
| v2-0002-Benchmark-script.patch | text/x-patch | 8.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-07-24 08:38:12 | Re: Collect ALTER PUBLICATION commands for event triggers |
| Previous Message | Laurenz Albe | 2026-07-24 08:02:45 | Re: Build warning with meson and dtrace on Fedora 43 |