Re: Postgres 7.3.1 poor insert/update/search performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Hirt <bhirt(at)mobygames(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres 7.3.1 poor insert/update/search performance
Date: 2003-01-22 16:09:58
Message-ID: 19952.1043251798@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Brian Hirt <bhirt(at)mobygames(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Stephan Szabo 2003-01-22 16:20:15 Re: optimizing query
Previous Message Andrew Sullivan 2003-01-22 12:05:24 Re: Postgres 7.3.1 poor insert/update/search performance