pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <jim.nasby@gmail.com>
To: Konstantin Knizhnik <knizhnik@garret.ru>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: index prefetching
Date: Tue, 16 Jan 2024 15:58:42 -0600
Message-ID: <44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com> (raw)
In-Reply-To: <2a4024ec-d12c-449c-97cd-a64e77dc7067@garret.ru>
References: <8ec36f51-b863-60e3-20e2-b9c981c5ce5e@enterprisedb.com>
	<06bb7d02-2c44-3062-731e-a735ba13da7e@enterprisedb.com>
	<367160ea-b1ed-4481-e804-bca509128878@enterprisedb.com>
	<cd63c8bc-3d3c-00ab-f7eb-fa55969c3234@enterprisedb.com>
	<CA+Tgmoaf0EHzcfWRydntzqhfc1Nv96C-60fEBbdf1pYZmT0SLA@mail.gmail.com>
	<280dc83c-a16f-4424-1319-95e7e3f798bd@enterprisedb.com>
	<CA+Tgmob5Nh7sQO8GENzEDSjYJQuKCgfhWtwDLjMtdueFMCh05A@mail.gmail.com>
	<98ba4b25-fae8-c1f4-1597-8093375a1986@enterprisedb.com>
	<20231221134314.wf2rs62d37u62j7t@alap3.anarazel.de>
	<afd17f3c-d496-5583-e93a-5a162d37235f@enterprisedb.com>
	<20231221154352.ijtg6wloa3nowivh@alap3.anarazel.de>
	<e00dac57-0181-4d9c-9eae-71346383e69b@enterprisedb.com>
	<CA+TgmoacmxNQBZsgMPSn9b7oE6QQLOqr_EP=YZTzdfHrqa5dqw@mail.gmail.com>
	<482ec3ff-52ad-415d-96fd-f3832a894023@enterprisedb.com>
	<8969e2cf-6b23-4682-ab56-b3c0aca877ab@garret.ru>
	<214d5bbe-21d7-4a63-b62b-91fe84f281f5@enterprisedb.com>
	<2a4024ec-d12c-449c-97cd-a64e77dc7067@garret.ru>

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_co...
-- 
Jim Nasby, Data Architect, Austin TX






view thread (516+ messages)  latest in thread

Message-ID: <44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com>
Permalink:  ../44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com/
Also on:    postgresql.org/message-id/44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: jim.nasby@gmail.com, knizhnik@garret.ru, tomas.vondra@enterprisedb.com
  Subject: Re: index prefetching
  In-Reply-To: <44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com>
  References: <8ec36f51-b863-60e3-20e2-b9c981c5ce5e@enterprisedb.com> <367160ea-b1ed-4481-e804-bca509128878@enterprisedb.com> <cd63c8bc-3d3c-00ab-f7eb-fa55969c3234@enterprisedb.com> <CA+Tgmoaf0EHzcfWRydntzqhfc1Nv96C-60fEBbdf1pYZmT0SLA@mail.gmail.com> <280dc83c-a16f-4424-1319-95e7e3f798bd@enterprisedb.com> <CA+Tgmob5Nh7sQO8GENzEDSjYJQuKCgfhWtwDLjMtdueFMCh05A@mail.gmail.com> <98ba4b25-fae8-c1f4-1597-8093375a1986@enterprisedb.com> <20231221134314.wf2rs62d37u62j7t@alap3.anarazel.de> <afd17f3c-d496-5583-e93a-5a162d37235f@enterprisedb.com> <20231221154352.ijtg6wloa3nowivh@alap3.anarazel.de> <e00dac57-0181-4d9c-9eae-71346383e69b@enterprisedb.com> <CA+TgmoacmxNQBZsgMPSn9b7oE6QQLOqr_EP=YZTzdfHrqa5dqw@mail.gmail.com> <482ec3ff-52ad-415d-96fd-f3832a894023@enterprisedb.com> <8969e2cf-6b23-4682-ab56-b3c0aca877ab@garret.ru> <214d5bbe-21d7-4a63-b62b-91fe84f281f5@enterprisedb.com> <2a4024ec-d12c-449c-97cd-a64e77dc7067@garret.ru> <44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox