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.96) (envelope-from ) id 1vaGCw-0060zh-02 for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Dec 2025 16:34:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vaGCu-00HSP3-0i for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Dec 2025 16:34:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vaGCt-00HSOu-2P for pgsql-hackers@lists.postgresql.org; Mon, 29 Dec 2025 16:34:56 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vaGCr-003QQV-1K for pgsql-hackers@lists.postgresql.org; Mon, 29 Dec 2025 16:34:55 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-64b61f82b5fso12275339a12.0 for ; Mon, 29 Dec 2025 08:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garret-ru.20230601.gappssmtp.com; s=20230601; t=1767026091; x=1767630891; darn=lists.postgresql.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=tLfxS7WD6ai+5uWFOd1QG6svYmAUAQqNLe5c/bof0Mk=; b=IGcygQINp41k1K79p8InK96mJjKDpl9zA+YQYCsXC0ltmt48JZn7cMHGwGparfxx2n jh5Rkq/rLFO+viI1M5mBJ7CROZywkloLf8n4bfQSBlfdUMr1pzGR7waqyzJzVLAol3yo x/j8QQ2whKwTBYgZKw+1v9B/+NTt7pBPixGomGzPVql1J80vru5PfigwbDEkxojf7WnO S+TubaEl4ygw6c1z3JIII4Qop1IHcLwjJNR5TSENxBTJv7tIqSFag0Uu5l8l+72eu9Fs 1J+irjUmBxJ4N4SfmJb2wJZLAlgxQxKm1+iCIKSm+Vg9HXZztVknVzNrdgBb5lQVeMGR rw1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767026091; x=1767630891; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tLfxS7WD6ai+5uWFOd1QG6svYmAUAQqNLe5c/bof0Mk=; b=Pa7UrVRr+tdjNAOUDyD5gp/m067PMhloxbSjFDitNAUFw4HyIz0bRz60qeVV2W9nn6 Dx37Mgmr0oZ1r1RSVHX6OUAlKe6ckmAe64srMpP8aT7AdHG0QKpthLGTkamRnZZOslKD u43nIo4U+EFNYPf33XWVAfV89DQV3khB6ZrEFSh57Sql+QW522KxDGHJzHtWNfVwxeoF LAhyXGuChE60vGowYJ9OGOLI79UNPv2ly6LoyxCjV4pRExV1WsGBdexPT5T8rWpslFKv N1KMfqDhcEyK++zuUuva449d4SqWjy9r2Q9UioIhyNyMCZ0cNd3CYoFwsCqr1k/qPOMy 2ZRA== X-Forwarded-Encrypted: i=1; AJvYcCU3EYwjURmxeO8ch8aa0vQjGf81f385oWrsJWvOaHq6LAa5k5ViLQorPYcQ14+AaJQ6LQ3ewpIuMOW3aIIE@lists.postgresql.org X-Gm-Message-State: AOJu0YwRtnuVAv4LIURWEYGKfFu06NcC0kqIBmK8m2vu425iwsiFQEBG 6i9zsU/6eVidiuGkzRRoFUGZxFFNTnSe75EfbUo/uqV2IxZgW8m1woRFGoCBWA4EKw== X-Gm-Gg: AY/fxX57hu2Ive1SPZ1Ni+9es9BUKd6sAaYrMDEVxrCsCvdAwAKUGEdKXKgQOmg10bP z/+uZRXAdOcZgPpqHyJ0fp9TwsYCqoQPC8BCMb39CZbPpwxu8zUxkcbKCYBqwE6HvPDaWjBG8o5 7UO+IMUMGskrovI7/yGLFJ+SK4vekZ6mbPfOPXKRiSpdtL0pKN+YBAK2ozcm2+RUkCoyOn9RJmk B0eak3dPl5WwEXWUCVWaI5amWTaflc48SyKW6YDtG0g7YrqljB5sK8b+lsvT6048GRPONd4NwS5 kS4xaFgZk/SZujukq9puZ8mW/MNOc2ffibqD7aEw1MnVySLvfAP1VKk0SRz58LAD6eRUYidJC00 N5uvoMCeiMr6RwIoBDqiv+UVLETZOYVeooW3AxH4PZ/IRP51g0SaRCPG9xP21hEO7w5YqONhWd+ sU2Jk8NXkcob4SSCJ8n/Z6 X-Google-Smtp-Source: AGHT+IHNNiugXmm04lQJUpoPg3IihO8jOfTYinJJchYOnnDeMn1+9VdZIzq2wAauzdLAJWYyXtHmIg== X-Received: by 2002:a05:6402:1ed5:b0:641:966d:82ba with SMTP id 4fb4d7f45d1cf-64b8e944ef3mr26489830a12.1.1767026090805; Mon, 29 Dec 2025 08:34:50 -0800 (PST) Received: from [10.248.37.148] ([130.41.208.2]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64b916b3b35sm32781218a12.30.2025.12.29.08.34.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Dec 2025 08:34:49 -0800 (PST) Content-Type: multipart/mixed; boundary="------------ngqZY0dfHsEhC1M53tJJfux7" Message-ID: Date: Mon, 29 Dec 2025 18:34:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: index prefetching To: Tomas Vondra , Peter Geoghegan Cc: Andres Freund , Thomas Munro , Nazir Bilal Yavuz , Robert Haas , Melanie Plageman , PostgreSQL Hackers , Georgios , Dilip Kumar References: <6d59c277-c440-4d1f-a46e-157958c06a5f@vondra.me> <4zeu5yb73byiquvf3eefsunnrydyqfxy3eup66jrliutrtd4xl@5iifjey4n5m5> <8f123089-49ed-4c35-ab28-e3df70d28043@garret.ru> <69908539-3cc5-4572-b69f-055fa40d3bea@garret.ru> <95b6c6ef-4ba1-44f6-b1ac-eef0bbb5327a@vondra.me> Content-Language: en-US From: Konstantin Knizhnik In-Reply-To: <95b6c6ef-4ba1-44f6-b1ac-eef0bbb5327a@vondra.me> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------ngqZY0dfHsEhC1M53tJJfux7 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 29/12/2025 1:53 AM, Tomas Vondra wrote: > > On 12/28/25 21:30, Konstantin Knizhnik wrote: >> On 28/12/2025 8:08 PM, Tomas Vondra wrote: >>> On 12/25/25 16:39, Konstantin Knizhnik wrote: >>>> On 21/12/2025 7:55 PM, Peter Geoghegan wrote: >>>>> On Wed, Dec 10, 2025 at 9:21 PM Peter Geoghegan wrote: >>>>>> Attached is v4. >>>>> Attached is v5. Changes from v4: >>>>> >>>>> * Simplified and optimized index-only scans, with a particular >>>>> emphasis on avoiding regressions with nested loop joins with an inner >>>>> index-only scan. >>>>> >>>>> There were quite a number of small problems/dead code related to >>>>> index-only scans fixed by this new v5. Overall, I'm quite a bit >>>>> happier with the state of index-only scans, which I'd not paid too >>>>> much attention to before now. >>>>> >>>>> * Added Valgrind instrumentation to the hash index patch, which was >>>>> required to fix some false positives. >>>>> >>>>> The generic indexam_util_batch_unlock routine had Valgrind >>>>> instrumentation in earlier versions, just to keep nbtree's buffer >>>>> locking checks from generating similar false positives. Some time >>>>> later, when I added the hashgetbatch patch, there were new Valgrind >>>>> false positives during hash index scans -- which I missed at first. >>>>> This new v5 revisions adds similar Valgrind checks to hash itself >>>>> (changes that add code that is more or less a direct port of the stuff >>>>> added to nbtree by commit 4a70f829), which fixes the false positives, >>>>> and is independently useful. >>>>> >>>>> The rule for amgetbatch-based index AMs is that they must have similar >>>>> buffer locking instrumentation. That seems like a good thing. >>>>> >>>>> -- >>>>> Peter Geoghegan >>>> I the previous mail I shared results of my experiments with different >>>> prefetch distance. >>>> I think that we should start prefetching of heap tuples not from the >>>> second batch, but after some number of proceeded tids. >>>> >>>> Attached please find a patch which implements this approach. >>>> And below are updated results: >>>> >>>> limit\prefetch    on      off   always  inc    threshold >>>> 1                 12074   12765  3146    3282     12394 >>>> 2                 5912    6198   2463    2438      6124 >>>> 4                 2919    3047   1334    1964      2910 >>>> 8                 1554    1496   1166    1409      1588 >>>> 16                815     775    947     940        600 >>>> 32                424     403    687     695        478 >>>> 64                223     208    446     453        358 >>>> 128               115     106    258     270        232 >>>> 256               68      53     138     149        131 >>>> 512               43      27     72      78          71 >>>> 1024              28      13     38      40          38 >>>> >>>> Last column is result of prefetch with read_stream_threshold=10. >>>> >>> That's great, but it only works for cases that can (and do) benefit from >>> the prefetching. Try running the benchmark with a data set that fits >>> into shared buffers (or RAM), which makes prefetching useless. >>> >>> I tried that with your test, comparing master, v5 and v5 + your >>> read_stream_threshold patch. See the attached run.sh script, and the PDF >>> summarizing the results. The last two column groups are comparisons to >>> master, with green=improvement, red=regression. There are no actual >>> improvements (1% delta is just noise). But the read_stream_threshold >>> results have a clear pattern of pretty massive (20-30%) regressions. >>> >>> The difference between v5 and v5-threshold is pretty clear. >>> >>> IIRC cases like this are *exactly* why we ended up with the current >>> heuristics, enabling prefetching only from the second batch. This >>> removes the risk of expensive read_stream init for very fast queries >>> that don't benefit anything. Of course, prefetching may be useless for >>> later batches too (e.g. if all the data is cached), but the query will >>> be expensive enough for the read_stream init cost to be negligible. >>> >>> To put this differently, the more aggressive the heuristics is (enabling >>> prefetching in more case), the more likely it's to cause regressions. >>> We've chosen to be more defensive, i.e. to sacrifice some possible gains >>> in order to not regress plausible workloads. I hope we agree queries on >>> fully cached "hot" data are pretty common / important. >>> >>> We can probably do better in the future. But we'll never know for sure >>> if a given scan benefits from prefetching. It's not just about the >>> number of items in the batch, but also about how many heap pages that >>> translates to, what I/O pattern (random vs. sequential?), how many are >>> already cached. For some queries we don't even know how many items we'll >>> actually need. We can't check all that at the very beginning, because >>> it's simply prohibitively expensive. >> >> I tried to reproduce your results, but at Mac I do not see some >> noticeable difference  for 250k records, fillfactor=10 and 4GB shared >> buffers >> between `enable_indexscan_prefetch=false` and >> `enable_indexscan_prefetch=true`. >> I can't believe that just adding this checks in `heap_batch_advance_pos` >> can cause 75% degrade of performance (because for limit < 10, no read >> stream is initialized, but still we somewhere loose 25%). >> >> I just commented this fragment of code in heapam_handler.c: >> >> >> #if 0 >>     proceed_items = ScanDirectionIsForward(direction) >>         ? pos->item - batch->firstItem >>         : batch->lastItem - pos->item; >>     /* Delay initializing stream until proceeding */ >>     if (proceed_items >= read_stream_threshold >>         && !scan->xs_heapfetch->rs >>         && !scan->batchqueue->disabled >>         && !scan->xs_want_itup    /* XXX prefetching disabled for IoS, >> for now */ >>         && enable_indexscan_prefetch) >>     { >>         scan->xs_heapfetch->rs = >>             read_stream_begin_relation(READ_STREAM_DEFAULT, NULL, >>                                        scan->heapRelation, MAIN_FORKNUM, >>  scan->heapRelation->rd_tableam->index_getnext_stream, >>                                        scan, 0); >>     } >> #endif >> >> and ... see no difference. >> >> I can understand why initializing read stream earlier (not at the second >> batch, but after 10 proceeded items) may have negative impact on >> performance when all data is present i shared buffers for LIMIT>=10. >> But how it can happen with LIMIT 1 and commented fragment above. There >> is nothing else in my patch except adding GUC. >> So I think that it is some "external" factor and wonder if you can >> reproduce this results (just first line). >> > It seems this is due to sending an extra SET (for the new GUC) in the > pgbench script, which is recognized only on the v5+threshold build. > > That's a thinko on my side, I should have realized the extra command > might affect this. It doesn't really affect the behavior, because 10 is > the default value for read_stream_threshold. I've fixed the script, will > check fresh results tomorrow. > > Still, I think most of what I said about heuristics when to initialize > the read stream, and the risk/benefit tradeoff, still applies. > > > regards Attached please find alternative version of the proposed patch which use number of disk reads as criteria for using read stream. --------------ngqZY0dfHsEhC1M53tJJfux7 Content-Type: text/plain; charset=UTF-8; name="read_stream_threshold_v2.patch" Content-Disposition: attachment; filename="read_stream_threshold_v2.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9iYWNrZW5kL2FjY2Vzcy9oZWFwL2hlYXBhbV9oYW5kbGVyLmMg Yi9zcmMvYmFja2VuZC9hY2Nlc3MvaGVhcC9oZWFwYW1faGFuZGxlci5jCmluZGV4IGI5ZDQy YjE1YTE4Li4xMjViOGFkZGQ5YiAxMDA2NDQKLS0tIGEvc3JjL2JhY2tlbmQvYWNjZXNzL2hl YXAvaGVhcGFtX2hhbmRsZXIuYworKysgYi9zcmMvYmFja2VuZC9hY2Nlc3MvaGVhcC9oZWFw YW1faGFuZGxlci5jCkBAIC0zNiw2ICszNiw3IEBACiAjaW5jbHVkZSAiY29tbWFuZHMvcHJv Z3Jlc3MuaCIKICNpbmNsdWRlICJleGVjdXRvci9leGVjdXRvci5oIgogI2luY2x1ZGUgIm1p c2NhZG1pbi5oIgorI2luY2x1ZGUgIm9wdGltaXplci9jb3N0LmgiCiAjaW5jbHVkZSAicGdz dGF0LmgiCiAjaW5jbHVkZSAic3RvcmFnZS9idWZtZ3IuaCIKICNpbmNsdWRlICJzdG9yYWdl L2J1ZnBhZ2UuaCIKQEAgLTQ2LDYgKzQ3LDggQEAKICNpbmNsdWRlICJ1dGlscy9idWlsdGlu cy5oIgogI2luY2x1ZGUgInV0aWxzL3JlbC5oIgogCitpbnQgcmVhZF9zdHJlYW1fdGhyZXNo b2xkID0gREVGQVVMVF9SRUFEX1NUUkVBTV9USFJFU0hPTEQ7CisKIHN0YXRpYyB2b2lkIHJl Zm9ybV9hbmRfcmV3cml0ZV90dXBsZShIZWFwVHVwbGUgdHVwbGUsCiAJCQkJCQkJCQkgUmVs YXRpb24gT2xkSGVhcCwgUmVsYXRpb24gTmV3SGVhcCwKIAkJCQkJCQkJCSBEYXR1bSAqdmFs dWVzLCBib29sICppc251bGwsIFJld3JpdGVTdGF0ZSByd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