On Mon, Oct 26, 2026 at 10:58 PM Jeremy Schneider <[email protected]>
wrote:

> I'm doing some more testing, and seeing if I can also simplify the
> reproduction by using two local cgroups instead of two VMs that need
> separate disks.  I'm also toying with a patch locally to add io_uring to
> Tomas' patches, we'll see how far I get.
>

This works well for a minimal local repro:
1. systemd-run -p MemoryMax=256M -p MemorySwapMax=0 -p IOAccounting=yes
2. scale-40 pgbench (500 MB accounts table)
3. UPDATE pgbench_accounts SET abalance = abalance + 1 WHERE aid % 20 = 0

https://github.com/ardentperf-labs/walreceiver-outage-repro/tree/main/local/prefetch

The read IOPS amplification is very pronounced, even in the case of FPI
disabled (which is the case that we want replica prefetch for).

These ran on my laptop, a Dell XPS 14 with an NVMe SSD. Each numeric cell:
run1 / run2 / run3.
MB is decimal; mean read size is in KiB.

recovery_prefetch=try, full_page_writes=off

                         Run 1       Run 2       Run 3
Read MB   Primary        1,008         912         865
          Replica          677         745         738
Read ops  Primary        7,435       5,781       3,294
          Replica       29,524      52,955      29,008
Mean KiB  Primary          132         154         256
          Replica           22          14          25

recovery_prefetch=off, full_page_writes=off

                         Run 1       Run 2       Run 3
Read MB   Primary        1,072         828         788
          Replica          770         949         781
Read ops  Primary        7,445       1,954       2,988
          Replica          380       1,664         901
Mean KiB  Primary          141         414         257
          Replica        1,978         557         847

recovery_prefetch=try, full_page_writes=on

                         Run 1       Run 2       Run 3
Read MB   Primary        1,929       1,795       1,556
          Replica          600         858         662
Read ops  Primary        5,835       3,797       4,846
          Replica       71,617      75,289      75,686
Mean KiB  Primary          323         462         314
          Replica            8          11           9

recovery_prefetch=off, full_page_writes=on

                         Run 1       Run 2       Run 3
Read MB   Primary        2,221       1,815       1,765
          Replica           12         108           2
Read ops  Primary        4,626       2,992      11,768
          Replica          104         417          53
Mean KiB  Primary          469         592         146
          Replica          114         254          42

Reply via email to