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 1m5uvl-0005qO-BM for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jul 2021 18:57:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5uvk-0006kz-2a for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jul 2021 18:57:24 +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 1m5uvj-0006kr-Qy for pgsql-hackers@lists.postgresql.org; Tue, 20 Jul 2021 18:57:23 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5uvh-0007DS-KE for pgsql-hackers@postgresql.org; Tue, 20 Jul 2021 18:57:22 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 19A763200926; Tue, 20 Jul 2021 14:57:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 20 Jul 2021 14:57:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=Cgkp8YzBJ+N7sC/L3NAl1qdDNVqod1my3VlW/qVUDeA=; b=pdr1Ar6h pT3px68n/XgtBuHsEY3U7LfJSBIMtR5o98b3IzrA8PfpsXibi32IC7jSlqhK5WPV TiChbk9GChdqgwKch/AzHuY/5aXrWJgyNavsYo5qL/s4av3tOpR25J2t1QCMpbzd z7wwZN1MZU1qm24RDLtVq/Vqo2VsLglW9/xkhL6Ao37aon139aRQl0ofL6WW8SPT H0ren+XzzVx+7AXQ32bY4GBOWL3EGoUbEJXMmVU8g7Yud4CsxGZ9iDvxDyylvIjs 14LJwNQEKeQaYPU+Y6p8tqYY8yEoCcqW8c++91bUP6INLGjZqQcY7q3/IydAFbfg QH7Z//YISCCXYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedvgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jul 2021 14:57:18 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id A68CE2A077A; Tue, 20 Jul 2021 14:57:15 -0400 (-04) Date: Tue, 20 Jul 2021 14:57:15 -0400 From: Alvaro Herrera To: Andres Freund Cc: pgsql-hackers@postgresql.org Subject: Re: something is wonky with pgbench pipelining Message-ID: <202107201857.kyv2gv3ouxot@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210720180039.23rivhdft3l4mayn@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-20, Andres Freund wrote: > I think what's happening is that the first recvfrom() actually gets all 7 > connection results. The server doesn't have any queries to process at that > point. But we ask the kernel whether there is new network input over and over > again, despite having results to process! Hmm, yeah, that seems a missed opportunity. > with-isbusy: > ... > tps = 3990.424742 (without initial connection time) > ... > 1,013.71 msec task-clock # 0.202 CPUs utilized > 80,203 raw_syscalls:sys_enter # 79.119 K/sec > 19,947 context-switches # 19.677 K/sec > 2,943,676,361 cycles:u # 2.904 GHz > 346,607,769 cycles:k # 0.342 GHz > 8,464,188,379 instructions:u # 2.88 insn per cycle > 226,665,530 instructions:k # 0.65 insn per cycle This is quite compelling. If you don't mind I can get this pushed soon in the next couple of days -- or do you want to do it yourself? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "La espina, desde que nace, ya pincha" (Proverbio africano)