Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A665E476F7C for ; Wed, 22 Jan 2003 11:21:13 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 673424759AF for ; Wed, 22 Jan 2003 11:09:56 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0MG9x5u019953; Wed, 22 Jan 2003 11:09:59 -0500 (EST) To: Brian Hirt Cc: pgsql-performance@postgresql.org Subject: Re: Postgres 7.3.1 poor insert/update/search performance In-reply-to: <1CE2D1AE-2DAB-11D7-BE6C-000393D9FD00@mobygames.com> References: <1CE2D1AE-2DAB-11D7-BE6C-000393D9FD00@mobygames.com> Comments: In-reply-to Brian Hirt message dated "Tue, 21 Jan 2003 18:44:57 -0700" Date: Wed, 22 Jan 2003 11:09:58 -0500 Message-ID: <19952.1043251798@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/222 X-Sequence-Number: 869 Brian Hirt 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