Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2D2J-0005l5-1u for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jun 2022 14:33:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o2D2H-0005nE-Rc for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jun 2022 14:33:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2D2H-0005n5-Id for pgsql-hackers@lists.postgresql.org; Fri, 17 Jun 2022 14:33:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2D2F-0003q6-CP for pgsql-hackers@postgresql.org; Fri, 17 Jun 2022 14:33:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 25HEX81T1221364; Fri, 17 Jun 2022 10:33:08 -0400 From: Tom Lane To: Andres Freund cc: David Rowley , Peter Geoghegan , PostgreSQL-development , Nikita Glukhov , Andrew Dunstan Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size In-reply-to: <20220617062456.ahbwho67m7c3lnr3@alap3.anarazel.de> References: <20220616233130.rparivafipt6doj3@alap3.anarazel.de> <20220617052228.mjwns6ugspihamsc@alap3.anarazel.de> <20220617062456.ahbwho67m7c3lnr3@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 16 Jun 2022 23:24:56 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1221362.1655476388.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 17 Jun 2022 10:33:08 -0400 Message-ID: <1221363.1655476388@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > The remaining difference looks like it's largely caused by the > enable_timeout_after(IDLE_STATS_UPDATE_TIMEOUT, ...) introduced as part = of the > pgstats patch. It's only really visible when I pin a single connection p= gbench > to the same CPU core as the server (which gives a ~16% boost here). > It's not the timeout itself - that we amortize nicely (via 09cf1d522). I= t's > that enable_timeout_after() does a GetCurrentTimestamp(). > Not sure yet what the best way to fix that is. Maybe not queue a new timeout if the old one is still active? BTW, it looks like that patch also falsified this comment (postgres.c:4478): * At most one of these timeouts will be active, so there's no need to * worry about combining the timeout.c calls into one. Maybe fixing that end of things would be a simpler way of buying back the delta. > Or we could add a timeout.c API that specifies the timeout? Don't think that will help: it'd be morally equivalent to enable_timeout_at(), which also has to do GetCurrentTimestamp(). regards, tom lane