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 1t6ZML-00Du1u-J3 for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Oct 2024 17:53:25 +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 1t6ZMJ-004Eqp-C7 for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Oct 2024 17:53:23 +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 1t6ZMJ-004Eqg-1o for pgsql-hackers@lists.postgresql.org; Thu, 31 Oct 2024 17:53:23 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6ZMG-003pAp-TC for pgsql-hackers@postgresql.org; Thu, 31 Oct 2024 17:53:22 +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 49VHrGxE1156773; Thu, 31 Oct 2024 13:53:16 -0400 From: Tom Lane To: Bruce Momjian cc: Greg Sabino Mullane , Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= , pgsql-hackers Subject: Re: Changing the default random_page_cost value In-reply-to: References: <877caxaxt6.fsf@wibble.ilmari.org> Comments: In-reply-to Bruce Momjian message dated "Thu, 31 Oct 2024 13:43:56 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1156771.1730397196.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 31 Oct 2024 13:53:16 -0400 Message-ID: <1156772.1730397196@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian writes: > On Thu, Oct 24, 2024 at 08:01:11PM -0400, Greg Sabino Mullane wrote: >> Okay, but we have no documented logic on why 4.0 was chosen either. :) > Uh, we do, and it is in the docs: > Random access to mechanical disk storage is normally much more e= xpensive > than four times sequential access. However, a lower default is = used > (4.0) because the majority of random accesses to disk, such as i= ndexed > reads, are assumed to be in cache. The default value can be tho= ught of > as modeling random access as 40 times slower than sequential, wh= ile > expecting 90% of random reads to be cached. Meh. Reality is that that is somebody's long-after-the-fact apologia for a number that was obtained by experimentation. regards, tom lane