pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedBest practices for data buffer cache setting/tuning (v15)
4+ messages / 4 participants
[nested] [flat]
* Best practices for data buffer cache setting/tuning (v15)
@ 2024-01-29 19:39 David Gauthier <dfgpostgres@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: David Gauthier @ 2024-01-29 19:39 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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 ?
Thanks in Advance.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Best practices for data buffer cache setting/tuning (v15)
@ 2024-01-29 21:05 Laurenz Albe <laurenz.albe@cybertec.at>
parent: David Gauthier <dfgpostgres@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Laurenz Albe @ 2024-01-29 21:05 UTC (permalink / raw)
To: David Gauthier <dfgpostgres@gmail.com>; pgsql-general@lists.postgresql.org
On Mon, 2024-01-29 at 14:39 -0500, 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 ?
Start with "shared_buffers" sized as a quarter of the available RAM and
define enough huge pages on the Linux kernel to fit shared buffers.
There are no tuning options for evicting buffers, and there cannot be any
fragmentation.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Best practices for data buffer cache setting/tuning (v15)
@ 2024-01-29 21:46 Christophe Pettus <xof@thebuild.com>
parent: David Gauthier <dfgpostgres@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Christophe Pettus @ 2024-01-29 21:46 UTC (permalink / raw)
To: David Gauthier <dfgpostgres@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
> On Jan 29, 2024, at 11:39, David Gauthier <dfgpostgres@gmail.com> 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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Best practices for data buffer cache setting/tuning (v15)
@ 2024-01-30 03:56 Bruce Momjian <bruce@momjian.us>
parent: Christophe Pettus <xof@thebuild.com>
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Momjian @ 2024-01-30 03:56 UTC (permalink / raw)
To: Christophe Pettus <xof@thebuild.com>; +Cc: David Gauthier <dfgpostgres@gmail.com>; pgsql-general@lists.postgresql.org
On Mon, Jan 29, 2024 at 01:46:30PM -0800, Christophe Pettus wrote:
>
>
> > On Jan 29, 2024, at 11:39, David Gauthier <dfgpostgres@gmail.com>
> > 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 <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-01-30 03:56 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 19:39 Best practices for data buffer cache setting/tuning (v15) David Gauthier <dfgpostgres@gmail.com>
2024-01-29 21:05 ` Laurenz Albe <laurenz.albe@cybertec.at>
2024-01-29 21:46 ` Christophe Pettus <xof@thebuild.com>
2024-01-30 03:56 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox