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 1qLQFM-0034o0-Rj for pgsql-performance@arkaria.postgresql.org; Mon, 17 Jul 2023 15:34:49 +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 1qLQFJ-00B7U0-TM for pgsql-performance@arkaria.postgresql.org; Mon, 17 Jul 2023 15:34:45 +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 1qLQFI-00B7Tr-Q7 for pgsql-performance@lists.postgresql.org; Mon, 17 Jul 2023 15:34:45 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qLQFB-000vHt-Do for pgsql-performance@postgresql.org; Mon, 17 Jul 2023 15:34:43 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 4C1F132000F9; Mon, 17 Jul 2023 11:34:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 17 Jul 2023 11:34:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1689608074; x=1689694474; bh=HC dBJeuJUWgTMvEeGmvEcTDnSbAMRv0fxiMcH/qalsA=; b=YD5Byu+2s90NBmL1ci lF1Gr3QwPleJykfkHMTr1SDXC8FvTfvpwg0vqE9me1FPcD9Job17JRdTkkLgFoDh 46pPpNghIlV1laWXOpXS27A7kyYpLNRU0HzP2SFI6VUL9Y5xP8byv9Y/yrHGXsJG QnoFn9GgkPWAvlau5LQC5uAiSdGJngiUP56poQK0Ckix+Piq7QXlpmDVuopRn/Ht JrXUt+P5KkCR0Hru9aqnXAQtoTqIcJaUi6C+S+2MCzh16pbMSWvuJxKK2tVZlsW+ I2l0oLKqn072LXw8pixB9kWnQy2yyzb8bSp5cgFsmUPK4sZgIB/4qfhjJ/FKvtyJ OeGg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1689608074; x=1689694474; bh=HCdBJeuJUWgTM vEeGmvEcTDnSbAMRv0fxiMcH/qalsA=; b=VWeHH+1tEXnMVSNqph0ZDceUHR4QF smvrkRchBfPakVGHSfeoEhVJiN4NWfyPcKtzzHyt8dqMH1Nn8DFwziHoZV6J/DWJ fAs5AwebUbgGfbuXltpkd+HIgCR0Z8PcE+D2NdPdZbsTsrI5+dG/gDwH/pdtEwcM F7tpV0VRZdSzGAI/CF2SqIpNh21wGfV6jk6C5VFst0Qpz3+RQmSp7bGSGYNab54U UdlDQ9PKIn8ERIIdUd51d3Hg4he2Aaeb27op1llPdjef122hKREnWU4UJPxzzAmV Ac/oqif0kzH2ywgr+cI5gdAGjNngZ0JEeJnyyJqof3qmV5TffFdWIzOww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrgedvgdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpeehffdtffehudffhefftdfgjefghfevheeuiedvhfefhfefkeehuefggeef gfelffenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdr uggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jul 2023 11:34:34 -0400 (EDT) Date: Mon, 17 Jul 2023 08:34:32 -0700 From: Andres Freund To: Dimitrios Apostolou Cc: Thomas Munro , pgsql-performance@postgresql.org Subject: Re: Performance implications of 8K pread()s Message-ID: <20230717153432.5qm6ywcdhhl5m2ny@awork3.anarazel.de> References: <218fa2e0-bc58-e469-35dd-c5cb35906064@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-07-17 16:42:31 +0200, Dimitrios Apostolou wrote: > Thanks, it sounds promising! Are the changes in the 16 branch already, > i.e. is it enough to fetch sources for 16-beta2? No, this is in a separate branch. https://github.com/anarazel/postgres/tree/aio > If so do I just configure --with-liburing (I'm on linux) and run with > io_method=io_uring? It's probably worth trying out both io_uring and worker. I've not looked at performance on btrfs. I know that some of the optimized paths for io_uring (being able to perform filesystem IO without doing so synchronously in an in-kernel thread) require filesystem cooperation, and I do not know how much attention btrfs has received for that. > Else, if I use the io_method=worker what is a sensible amount of worker > threads? Depends on your workload :/. If you just want to measure whether it fixes your single-threaded query execution issue, the default should be just fine. > Should I also set all the flags for direct I/O? (io_data_direct=on > io_wal_direct=on). FWIW, I just pushed a rebased version to the aio branch, and there the config for direct io is io_direct = 'data, wal, wal_init' (or a subset thereof).