pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brian Hirt <bhirt@mobygames.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres 7.3.1 poor insert/update/search performance
Date: Wed, 22 Jan 2003 11:09:58 -0500
Message-ID: <19952.1043251798@sss.pgh.pa.us> (raw)
In-Reply-To: <1CE2D1AE-2DAB-11D7-BE6C-000393D9FD00@mobygames.com>
References: <1CE2D1AE-2DAB-11D7-BE6C-000393D9FD00@mobygames.com>

Brian Hirt <bhirt@mobygames.com> writes:
> So my question is:  if the kernel is caching all this data, what's the  
> benefit of setting this to 1000 or higher?   Why wouldn't i just set it  
> to 0 if I believe my kernel is doing a good job.

Well, setting it to 0 won't work ;-).  There's some minimum number of
buffers needed for PG to work at all; depending on complexity of your
queries and number of active backends it's probably around 25-100.
(You'll get "out of buffers" failures if too few.)  But more to the
point, when shared_buffers is too small you'll waste CPU cycles on
unnecessary data transfers between kernel and user memory.  It seems to
be pretty well established that 64 is too small for most applications.
I'm not sure how much is enough, but I suspect that a few thousand is
plenty to get past the knee of the performance curve in most scenarios.

			regards, tom lane



view thread (16+ messages)  latest in thread

Message-ID: <19952.1043251798@sss.pgh.pa.us>
Permalink:  ../19952.1043251798@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19952.1043251798@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bhirt@mobygames.com
  Subject: Re: Postgres 7.3.1 poor insert/update/search performance
  In-Reply-To: <19952.1043251798@sss.pgh.pa.us>
  References: <1CE2D1AE-2DAB-11D7-BE6C-000393D9FD00@mobygames.com> <19952.1043251798@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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