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 1sjekz-002f5K-1N for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Aug 2024 13:00:09 +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 1sjekw-001txP-TN for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Aug 2024 13:00:07 +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 1sjekw-001txH-JG for pgsql-hackers@lists.postgresql.org; Thu, 29 Aug 2024 13:00:07 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sjeku-0020zK-Jx for pgsql-hackers@postgresql.org; Thu, 29 Aug 2024 13:00:05 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2f4f2cda058so15630471fa.1 for ; Thu, 29 Aug 2024 06:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724936403; x=1725541203; darn=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=iCoNPKf7+rhVobKquTAswmWsO51WXOzZQw4R+Cjos8Y=; b=LKkyGGY2bgSSxRBpSG+H+rZhjT0yUE1LFdf1HBlnMzA6CR6IdGX1yyhfpV6DHpEcxq 1zCLwytcL96zY2BWQQtCTJ9EpJJiLlE5sUPfQZEts666Lt3aUQtg4TSm6gA42cIecmul V/hvk1V1ffZDeJ6qbK8EGiAkRUullXTI++CZwP+RKWfBlqt8VRcdVD4Epb75MC/XR8Bi FAeF5+pvDxkEw9PyNqy8lWqOyejxkzvRVbJNRm26N0pCXt/G7igpxzc71ukd+L7hGb/g CuVPTcGP5JrsiqrYl/A4L7f8ec7IWcd9v+ZlohmeZUaZJzUNZx9MpfBdbOMniRqKC9Wn c/mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724936403; x=1725541203; 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=iCoNPKf7+rhVobKquTAswmWsO51WXOzZQw4R+Cjos8Y=; b=NpxI7on1cLtRfOXDnqil7DWnHB0iVxYb/b+C4ebNX2UEa07UxEzG8jy6DoiPJS8z2M yfpiy3GnPwcdUDmWtWMlb9yHOFTmJe15jbZn5sJCVAKAhzF4svmu9cZYXWeph1WZ7snv VmWJ+zjLJOPzqKhW3eHT6WvVVi+xvHjuRxpYljrt8oGbeILe5CVwfr4C+mGydae02pLh pjjCsUIkrzgpW+R/rZK673kuCpjBebPsJzuWb2DnvLv42QUFjR4lEp4vx+ZfAxJqrj+J A+OxMoSjO5/Mbwuwo7QWFvBGCUatgLT9b8tKfrWCvZ9wFEITx5ZSHwBMzCzMZO80+E3f 7Hzw== X-Forwarded-Encrypted: i=1; AJvYcCVuwC6snzGGJ4+g6v1Vead6Y9LZnD7AOcxO0N8PkNmHJhNSOal7rdnEM3rsW4NryycWc6wBCAcW2Nx303f5@postgresql.org X-Gm-Message-State: AOJu0YzjfqfFzfPXTtWTRyq9cqnkLsPIhSRJK9BNVuRNRk/tYuP9zZ/h Mu/Ihb24Yqs7I+VWrlEyScrs59DyzsnY2IY6Ry88/QRkvzwAroGj X-Google-Smtp-Source: AGHT+IEHs/qWoboIBt4lLozD0ELjJUEZvJ98nn+b1Pjmf6fk/8eGXUHMBPF04MuVeAd+lahkDrv1eQ== X-Received: by 2002:a05:6512:39d3:b0:52e:a737:2958 with SMTP id 2adb3069b0e04-5353ebf75b1mr709407e87.28.1724936402013; Thu, 29 Aug 2024 06:00:02 -0700 (PDT) Received: from [1.0.0.7] ([91.185.76.193]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2f614f007b5sm1740351fa.43.2024.08.29.06.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Aug 2024 06:00:01 -0700 (PDT) Message-ID: <679d9fe8-360d-7324-2809-d0ee46493f55@gmail.com> Date: Thu, 29 Aug 2024 16:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Streaming read-ready sequential scan code Content-Language: en-US To: Thomas Munro Cc: Melanie Plageman , Andres Freund , David Rowley , Heikki Linnakangas , Pg Hackers References: <20240407221229.upgvhyf2gzflcawi@awork3.anarazel.de> <63a63690-dd92-c809-0b47-af05459e95d1@gmail.com> <7e090ca5-1d3d-b4f3-9060-8ec88f444c6c@gmail.com> <04adb164-6df3-51c2-edf9-909a1e977976@gmail.com> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Thomas, 29.08.2024 01:16, Thomas Munro wrote: > Yeah. That's quite interesting, and must destabilise that > simple-minded demo. I'm curious to know exactly what contention is > causing that (about 3/4 of a millisecond that I don't see and now I > want to know what it's waiting for), but it's a very crude test > lacking timer resolution in the earlier messages, and it's an > unrelated topic and a distraction. Perhaps it explains why you saw > two different behaviours in Q15 with the patch and I didn't, though. > Really it shouldn't be so sensitive to such variations, it's obviously > a terrible plan, and TPC-DS needs a planner hacker mega-brain applied > to it; I'm going to try to nerd-snipe one... I looked at two perf profiles of such out-of-sync processes and found no extra calls or whatsoever in the slow one, it just has the number of perf samples increased proportionally. It made me suspect CPU frequency scaling... Indeed, with the "performance" governor set and the boost mode disabled, I'm now seeing much more stable numbers (I do this tuning before running performance tests, but I had forgotten about that when I ran that your test, my bad). I'm sorry for the noise and the distraction. Still, now I can confirm your results. Without the patch, two parallel workers gave "Buffers: shared hit=217 / Buffers: shared hit=226" 10 times out of 10. And with the patch, I've got "shared hit=219 / shared hit=224" 3 times, "shared hit=220 / shared hit=223" 4 times, "shared hit=221 / shared hit=222" 3 times of 10. On b7b0f3f27~1, my results are: "shared hit=219 / shared hit=224": 2 "shared hit=220 / shared hit=223": 3 "shared hit=221 / shared hit=222": 4 "shared hit=218 / shared hit=225": 1 Best regards, Alexander