Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id CE41E9FA6AF for ; Thu, 19 Oct 2006 16:11:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 91524-01 for ; Thu, 19 Oct 2006 19:10:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 1C8FA9F9F77 for ; Thu, 19 Oct 2006 16:10:54 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from elasmtp-dupuy.atl.sa.earthlink.net (elasmtp-dupuy.atl.sa.earthlink.net [209.86.89.62]) by svr4.postgresql.org (Postfix) with ESMTP id F23445AF861 for ; Thu, 19 Oct 2006 19:10:52 +0000 (GMT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=nXiHWLPi/P6UcT92Ja0SQ6uU2UTapCEQAeyPQr0gJEb0J/FXladS9mQqk7q1YHkC; h=Received:Message-Id:X-Mailer:Date:To:From:Subject:Cc:In-Reply-To:References:Mime-Version:Content-Type:X-ELNK-Trace:X-Originating-IP; Received: from [71.243.1.211] (helo=rpeace101.earthlink.net) by elasmtp-dupuy.atl.sa.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1GadHs-0000rf-FI; Thu, 19 Oct 2006 15:10:40 -0400 Message-Id: <7.0.1.0.2.20061019145143.039a23e0@earthlink.net> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Thu, 19 Oct 2006 15:10:35 -0400 To: Tobias Brox From: Ron Subject: Re: Swappiness setting on a linux pg server Cc: pgsql-performance@postgresql.org In-Reply-To: <20061019163530.GC31916@oppetid.no> References: <20061019163530.GC31916@oppetid.no> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ELNK-Trace: acd68a6551193be5d780f4a490ca69563f9fea00a6dd62bcfe6e603e16611e1cc6d889fccce4feab350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 71.243.1.211 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.335 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/420 X-Sequence-Number: 21549 At 12:35 PM 10/19/2006, Tobias Brox wrote: >[Jim C. Nasby - Thu at 10:28:31AM -0500] > > I think it'd be much better to experiment with using much larger > > shared_buffers settings. The conventional wisdom there is from 7.x days > > when you really didn't want a large buffer, but that doesn't really > > apply with the new buffer management we got in 8.0. I know of one site > > that doubled their performance by setting shared_buffers to 50% of > > memory. > >I've upped it a bit, but it would require a server restart to get the >new setting into effect. This is relatively "expensive" for us. Does >anyone else share the viewpoint of Nasby, and does anyone have >recommendation for a good value? Our previous value was 200M, and I >don't want to go to the extremes just yet. We have 6G of memory >totally. Jim is correct that traditional 7.x folklore regarding shared buffer size is nowhere near as valid for 8.x. Jim tends to know what he is talking about when speaking about pg operational issues. Nonetheless, "YMMV". The only sure way to know what is best for your SW running on your HW under your load conditions is to test, test, test. A= Find out how much RAM your OS image needs. Usually 1/3 to 2/3 of a GB is plenty. B= Find out how much RAM pg tasks need during typical peak usage and how much each of those tasks is using. This will tell you what work_mem should be. Note that you may well find out that you have not been using the best size for work_mem for some tasks when you investigate this. (Total RAM) - A - B - (small amount for error margin) = 1st pass at shared_buffers setting. If this results in better performance that your current settings, either declare victory and stop or cut the number in half and see what it does to performance. Then you can either set it to what experiment thus far has shown to be best or use binary search to change the size of shared_buffers and do experiments to your heart's content. Ron