Re: index prefetching

From: Jim Nasby <jim(dot)nasby(at)gmail(dot)com>
To: Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: index prefetching
Date: 2024-01-16 21:58:42
Message-ID: 44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/16/24 2:10 PM, Konstantin Knizhnik wrote:
> Amazon RDS is just vanilla Postgres with file system mounted on EBS
> (Amazon  distributed file system).
> EBS provides good throughput but larger latencies comparing with local SSDs.
> I am not sure if read-ahead works for EBS.

Actually, EBS only provides a block device - it's definitely not a
filesystem itself (*EFS* is a filesystem - but it's also significantly
different than EBS). So as long as readahead is happening somewheer
above the block device I would expect it to JustWork on EBS.

Of course, Aurora Postgres (like Neon) is completely different. If you
look at page 53 of [1] you'll note that there's two different terms
used: prefetch and batch. I'm not sure how much practical difference
there is, but batched IO (one IO request to Aurora Storage for many
blocks) predates index prefetch; VACUUM in APG has used batched IO for a
very long time (it also *only* reads blocks that aren't marked all
visble/frozen; none of the "only skip if skipping at least 32 blocks"
logic is used).

1:
https://d1.awsstatic.com/events/reinvent/2019/REPEAT_1_Deep_dive_on_Amazon_Aurora_with_PostgreSQL_compatibility_DAT328-R1.pdf
--
Jim Nasby, Data Architect, Austin TX

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-01-16 21:59:17 Re: Emit fewer vacuum records by reaping removable tuples during pruning
Previous Message Maiquel Grassi 2024-01-16 21:58:15 RE: New Window Function: ROW_NUMBER_DESC() OVER() ?