X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 87A57D1C4CA for ; Thu, 7 Aug 2003 18:59:24 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 19075-05 for ; Thu, 7 Aug 2003 15:58:00 -0300 (ADT) Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242]) by svr1.postgresql.org (Postfix) with ESMTP id A092CD1C488 for ; Thu, 7 Aug 2003 15:59:13 -0300 (ADT) Received: from [192.168.1.1] ([68.11.66.83]) by lakemtao03.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030807185916.CFTY23518.lakemtao03.cox.net@[192.168.1.1]> for ; Thu, 7 Aug 2003 14:59:16 -0400 Subject: Re: PostgreSQL performance problem -> tuning From: Ron Johnson To: PgSQL Performance ML In-Reply-To: <3F328683.7050008@lviv.bank.gov.ua> References: <3F328683.7050008@lviv.bank.gov.ua> Content-Type: text/plain Message-Id: <1060282754.12221.50.camel@haggis> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 07 Aug 2003 13:59:14 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/142 X-Sequence-Number: 2959 On Thu, 2003-08-07 at 12:04, Yaroslav Mazurak wrote: > scott.marlowe wrote: > > > On Thu, 7 Aug 2003, Yaroslav Mazurak wrote: > > >>Shridhar Daithankar wrote: > [snip] > > My guess is that this is exactly what's happening to you, you're using so > > much memory that the machine is running out and slowing down. > > > Drop shared_buffers to 1000 to 4000, sort_mem to 8192 and start over from > > there. Then, increase them each one at a time until there's no increase > > in speed, or stop if it starts getting slower and back off. > > > bigger is NOT always better. > > Let I want to use all available RAM with PostgreSQL. > Without executing query (PostgreSQL is running) top say now: You're missing the point. PostgreSQL is not designed like Oracle, Sybase, etc. They say, "Give me all the RAM; I will cache everything myself." PostgreSQL says "The kernel programmers have worked very hard on disk caching. Why should I duplicate their efforts?" Thus, give PG only a "little" RAM, and let the OS' disk cache hold the rest. -- +---------------------------------------------------------------+ | Ron Johnson, Jr. Home: ron.l.johnson@cox.net | | Jefferson, LA USA | | | | "Man, I'm pretty. Hoo Hah!" | | Johnny Bravo | +---------------------------------------------------------------+