Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPrSL-00EkbU-TH for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jan 2024 21:58:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rPrSL-008S6s-11 for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jan 2024 21:58:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPrSK-008S6a-Nr for pgsql-hackers@lists.postgresql.org; Tue, 16 Jan 2024 21:58:48 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rPrSI-001sml-13 for pgsql-hackers@lists.postgresql.org; Tue, 16 Jan 2024 21:58:47 +0000 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6ddeb015ec6so5618624a34.0 for ; Tue, 16 Jan 2024 13:58:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705442325; x=1706047125; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pvbibep46ojhsS+9082IXQmra7Gm2d8AkY0PNJ+ib+A=; b=Wo+jhquvUePcMqOXsDsjWl5SaOtdTIPQTrVwJFznYkS/rzocXzDeNzOIPlD1Qew8WT TazT9TTGxXutjY+dpbtQpaXy54+KEssyp1NdG8bRZ7UhnOD0sAm8VYmjaOP/8Pg7b18X f6+vuN6hIaBQnrc2lrF6EeXDLhwGFh3sp0cBuZGc4+Ghc1rJTG9YDENnQW0vRc3BxCAS 4GyJkV1ry+5v3g63gO49NTxszuyWLY0mEPz94gWsybTYBpJmnv4pTm655wugg4zzMIYm JRsdJgJkiKkE2C5PVbCD0WI9EA5leAOvUlS0VpgBHuNwjUjEGnyln3CJfsHFY0kFBRec jEXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705442325; x=1706047125; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pvbibep46ojhsS+9082IXQmra7Gm2d8AkY0PNJ+ib+A=; b=k4qS9fLjlDval2qB1zCmV4au/q8amD0fzJ5W3tb05x3cpWgc0aWvzB+euRatTfyavt wBpTGix/taHeJNHb+mFIA0/fWdA9ftHpokJQFY+x8/FD45/qv0jL1C2W7Yq6yifKyq24 t+SdFrQHPm3ezcQ/23VYqNhO2IlAG1hTc/ykpbvPnsSSZYRPBxNFC+Iaei7WeF6t0eh8 xq12/eDgRHmOw0inqC+922ie3t0VmHfZ510xGXeZJ/hIx0B78n74onLSq75VFcLY+46S r4paXkC/zDDU2p7T+x8DKXWVSrAiEQfdTekAHwcc8i7GONHyozDOZrnpNrpJbEOMCQTu c0Dg== X-Gm-Message-State: AOJu0Yzqy2QmxepvSLatqgsVivQgCpSSzGVMJYNfFPjusBBEOb2dkNZu k4MCdl48tAmIeaNWZrDREA== X-Google-Smtp-Source: AGHT+IEtI/HuKHn/Rgn3/ffaaMQM2v793ZjlEMTPlnN3m3WgFAZSWW5TNgtrzcbslWDPetrU1mFAUg== X-Received: by 2002:a9d:5912:0:b0:6dd:f23c:e123 with SMTP id t18-20020a9d5912000000b006ddf23ce123mr7847371oth.50.1705442325302; Tue, 16 Jan 2024 13:58:45 -0800 (PST) Received: from [192.168.2.16] (070-113-014-216.res.spectrum.com. [70.113.14.216]) by smtp.gmail.com with ESMTPSA id h8-20020a9d6f88000000b006de4ca392d7sm1040338otq.62.2024.01.16.13.58.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Jan 2024 13:58:44 -0800 (PST) Message-ID: <44118842-d562-4143-8cf2-b9f6e079d0e3@gmail.com> Date: Tue, 16 Jan 2024 15:58:42 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: index prefetching Content-Language: en-US To: Konstantin Knizhnik , Tomas Vondra Cc: PostgreSQL Hackers References: <8ec36f51-b863-60e3-20e2-b9c981c5ce5e@enterprisedb.com> <06bb7d02-2c44-3062-731e-a735ba13da7e@enterprisedb.com> <367160ea-b1ed-4481-e804-bca509128878@enterprisedb.com> <280dc83c-a16f-4424-1319-95e7e3f798bd@enterprisedb.com> <98ba4b25-fae8-c1f4-1597-8093375a1986@enterprisedb.com> <20231221134314.wf2rs62d37u62j7t@alap3.anarazel.de> <20231221154352.ijtg6wloa3nowivh@alap3.anarazel.de> <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> From: Jim Nasby In-Reply-To: <2a4024ec-d12c-449c-97cd-a64e77dc7067@garret.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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