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 1rUfFD-00CI5n-FE for pgsql-general@arkaria.postgresql.org; Tue, 30 Jan 2024 03:57:07 +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 1rUfFC-0029kd-0a for pgsql-general@arkaria.postgresql.org; Tue, 30 Jan 2024 03:57:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rUfFB-0029kV-Ld for pgsql-general@lists.postgresql.org; Tue, 30 Jan 2024 03:57:05 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rUfF4-004SBU-Ot for pgsql-general@lists.postgresql.org; Tue, 30 Jan 2024 03:57:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=pXxsxB7THeK+/6VpyW7+5OJmhmQ0MAqOvxYMrr5dryk=; b=E1qur IpsEH0jcczZgpzXw0y0RePk9HM9zz57oYWY8RM8l+kokzAMJa8fop45B2I2rgvgTQlpkRtMpKFbgg 7bzSRkQrcgPd8iJQ/n7xxUJj1wqtf8jp/6a4l+40HWn3oIgWECBpLbzEii6rW1tYJC/+r9iWt/kT4 UW94NhZd4Ypqd7R1iTMpjqtMRJYbZq4miCyZk4+PpJR8xiFh41Oi49G/8VtQHNuNc0jSOjtTU0/7n oWY8HO8ZdzGTIQUrvX8oLhLQz1jSSobQcRJQaJdTSuGsZtR38z8Py/g1u38FNYsPB+UwEjsvTnXMf PVHyK8pis/jQg79b/TGnHRYi9yoEA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1rUfF2-004rms-2c; Mon, 29 Jan 2024 22:56:56 -0500 Date: Mon, 29 Jan 2024 22:56:56 -0500 From: Bruce Momjian To: Christophe Pettus Cc: David Gauthier , pgsql-general@lists.postgresql.org Subject: Re: Best practices for data buffer cache setting/tuning (v15) Message-ID: References: <8D24CE5D-16B2-4962-A741-7C5CAD54FAC5@thebuild.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8D24CE5D-16B2-4962-A741-7C5CAD54FAC5@thebuild.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jan 29, 2024 at 01:46:30PM -0800, Christophe Pettus wrote: > > > > On Jan 29, 2024, at 11:39, David Gauthier > > wrote: > > > > Is there a document which makes recommendations on sizing data > > buffer cache, tuning options which evict old/unused data in mem, and > > cache fragmentation avoidance for a v15.3 DB ? > > On any modern system, set shared_buffers to 25% of instance RAM, and > get on with life. > > I realize that seems glib, but small variations in shared_buffers make > almost no significant difference in performance. There are unusual > workloads (like very high insert rate with few queries) that require > different settings, but for most typical ELTP or data warehouse > workloads, that is sufficient. This blog entry might explain why Postgres requires less tuning of shared buffers than other database systems: https://momjian.us/main/blogs/pgblog/2018.html#December_7_2018 -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.