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 1tue7J-00APy3-OJ for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 21:04:53 +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 1tue7I-005Wds-9Z for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 21:04:52 +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 1tue7H-005Wdk-Vt for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 21:04:51 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tue7E-003Zkc-0I for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 21:04:51 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 4B9FA1380079; Tue, 18 Mar 2025 17:04:47 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 18 Mar 2025 17:04:47 -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:subject :subject:to:to; s=fm1; t=1742331887; x=1742418287; bh=bWNp5yJvAd mlSS2L+lZD1mIE+OANcvZhJdbCf9SF/Co=; b=iOeqM+BOWuQSZNEpddtTzVuSLm k1JkGrPQckplHn4vHpi+AGISfBZjq0uhBRk4BkM1zoMHpMsrWCDMy6E1+W1h5Cl7 HTaFfwrLJZ3NVZHej1hVAqCAZE3xoNnutfhrlAkg/ntRDkfe4MNjCG7oYoBffGhM 3bF1TiEkf/C6C6Gf5tZLKPEnXGMI7R1Hl7GVbC1zE780elqElItCsXuCx4C6mces aSGUF1XYamHCUVCMPSRXJnOwFOPokGl3KkvdDUEsXcShz6cl56/94KX6uyL7M11g 68e/Tx6kKcvqwQ+wJjfppwd76xOD6DRJNS5KV4GR2gdUNBMb53415CXI78Eg== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1742331887; x=1742418287; bh=bWNp5yJvAdmlSS2L+lZD1mIE+OANcvZhJdb Cf9SF/Co=; b=MAW1ODL9ZzYiacA0ybEMravHDuTmRs89fV55jE1GLMxNt8qEEsH AD0m8c7HK5gR8K7fdb7wPDsf+aqx0ksMsF23MmCoh0z1HC++PxzPEqen37N4BYrS MaKCSE7qP49oUP7M8sbNQwx1HHCXI4hzw83zJ+tOYTbgyTZHvHVzWA0vNMTwvp8T 9Qyqi/2fvuoAmixAs6JwO1lWdnw600igq2fBLbyL/i5Yn6jhdHTQLjN8t/IdhiPz jtSVtDI2+cZNEpTZDopMajcit2ZRCQP1H6Vxi2Yo+kZYrDX4UWGYzGlUD06gFv2a 3rTut26p/9G2Nu8rWhfH1OmS0jum8jnMYgQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeefgeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtsfdttddt vdenucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrg iivghlrdguvgeqnecuggftrfgrthhtvghrnhepleefueeijeevffekleehkefgleevgffh jefhkeeghedvuedtvdfhhffgueeuieeunecuffhomhgrihhnpehpohhsthhgrhgvshhqlh drohhrghdpphhoshhtghhrrdgvshenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtg hpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhrvghgrdhsmhhi thhhsegtrhhunhgthhihuggrthgrrdgtohhmpdhrtghpthhtohepmhgvlhgrnhhivghplh grghgvmhgrnhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgv rhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopegsrhhutg gvsehmohhmjhhirghnrdhush X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Mar 2025 17:04:46 -0400 (EDT) Date: Tue, 18 Mar 2025 17:04:46 -0400 From: Andres Freund To: Bruce Momjian Cc: Melanie Plageman , PostgreSQL-development , Greg Smith Subject: Re: Increase default maintenance_io_concurrency to 16 Message-ID: <4p7gtb2nfr3njhgq7bmpe24unsbyoerlom7zrcu5sl2vyyutlp@ol5ywrm7j5ok> References: 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 2025-03-18 16:35:29 -0400, Bruce Momjian wrote: > Uh, the random_page_cost = 4 assumes caching, so it is assuming actual > random I/O to be 40x slower, which I doubt is true for SSDs: Uh, huh: > https://www.postgresql.org/docs/current/runtime-config-query.html#RUNTIME-CONFIG-QUERY-CONSTANTS > > Random access to mechanical disk storage is normally much more expensive > than four times sequential access. However, a lower default is used > (4.0) because the majority of random accesses to disk, such as indexed > reads, are assumed to be in cache. The default value can be thought of > as modeling random access as 40 times slower than sequential, while > expecting 90% of random reads to be cached. Is that actually a good description of what we assume? I don't know where that 90% is coming from? Briefly skimming through selfuncs.c and costsize.c I don't see anything. The relevant change: commit c1d9df4fa227781b31be44a5a3024865a7f48049 Author: Bruce Momjian Date: 2012-02-14 16:54:54 -0500 Document random page cost is only 4x seqeuntial, and not 40x. The relevant discussion seems to be: https://postgr.es/m/4F31A05A.1060506%402ndQuadrant.com But I don't see any origin of that number in that thread. I am not sure if I found the correct email for Greg Smith? Greetings, Andres Freund