Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 885D5634E66 for ; Tue, 2 Feb 2010 17:44:49 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 99514-03 for ; Tue, 2 Feb 2010 21:44:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp114.plus.mail.re1.yahoo.com (smtp114.plus.mail.re1.yahoo.com [69.147.102.77]) by mail.postgresql.org (Postfix) with SMTP id 8B495634E50 for ; Tue, 2 Feb 2010 17:44:38 -0400 (AST) Received: (qmail 79258 invoked from network); 2 Feb 2010 21:44:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type; b=ZJzWBnVLVKuB0SzR7+GWmADSffPWeHI/MQwgsW0Y3/LU34fP/xCCIHEm7ibEONyzOvNADXOrkUi8KSCvZYysB1gfZdUV6g3FC6gnb4ualzZjiy6tqPxOORtWVkRCiL0mrJjSQ8hZVnom05CfzOlpFbsy6xPskD6CWIoGw0BMh6A= ; Received: from booksys-207-111-162-65.booksys.com (rclemley@207.111.162.65 with plain) by smtp114.plus.mail.re1.yahoo.com with SMTP; 02 Feb 2010 13:44:37 -0800 PST X-Yahoo-SMTP: 38zf3cmswBAUJ1LzNE6a.TW0Go34 X-YMail-OSG: O4ITS_AVM1mw9vEVM3bH5djmxiK6W_gGV2QNtMO45f7Yi1tv1AZdfXvlVNaUxnCsd9j4lB__sfPMXrk3yNHItfAqBCMSq1kXtWVliGP0GGCDGn45tyZhYVk0QZCB0SuwnMTy6zFEt.q5kqMGMMZFauiBMTNGIhRCqbCHT46ulBiYMYd6SD9U6pvGrYqSi8iMkIo6rrs2y4n1EkX2Au_L27SqfPlEsWNplMco7xcMIKsSwbZtFWwbU.Rbn5ecOsdaAYXKl90o6Wursj4o_R5JsbhDFbXJCNYLC_36Hm8SBmukDrV_64yoE.Ng_g_A9C.VzsDppdOmOZGVHjsOKnDwdkclwqVDy.4oRwKqvpDPeF2EVo0NERmH_HiJCV0x4X2.0wlbaNUIkiA..uxYatyWnpzBTAxcvau1wFThos0bwmR4Gpzuce90FGfjvvgqBjUelOBtql1FlTIzD5tcphQ- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4B689CC4.8010406@yahoo.com> Date: Tue, 02 Feb 2010 15:44:36 -0600 From: Rob User-Agent: Icedove 1.5.0.14eol (X11/20090105) MIME-Version: 1.0 To: Scott Marlowe CC: pgsql-performance@postgresql.org Subject: Re: System overload / context switching / oom, 8.3 References: <4B6878DF.3000004@yahoo.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------070202080704080208020909" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.597 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001, UNPARSEABLE_RELAY=0.001 X-Spam-Level: X-Archive-Number: 201002/38 X-Sequence-Number: 37459 This is a multi-part message in MIME format. --------------070202080704080208020909 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Scott Marlowe wrote: > On Tue, Feb 2, 2010 at 12:11 PM, Rob wrote: > >> postgresql.conf: >> max_connections = 1100 >> work_mem = 32MB >> > > 32MB * 1000 = 32,000MB... And that's if you max out connections and > they each only do 1 sort. If you're running many queries that run > 1 > sorts it'll happen a lot sooner. > > Either drop max connections or work_mem is what I'd do to start with. > If you have one or two reporting apps that need it higher, then set it > higher for just those connections / users Thanks much. So does dropping work_mem to the default of 1MB sound good? By moving databases around we're getting max_connections below 600 or 700. --------------070202080704080208020909 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Scott Marlowe wrote:
On Tue, Feb 2, 2010 at 12:11 PM, Rob <rclemley@yahoo.com> wrote:
  
postgresql.conf:
max_connections = 1100
work_mem = 32MB
    

32MB * 1000 = 32,000MB...  And that's if you max out connections and
they each only do 1 sort.  If you're running many queries that run > 1
sorts it'll happen a lot sooner.

Either drop max connections or work_mem is what I'd do to start with.
If you have one or two reporting apps that need it higher, then set it
higher for just those connections / users

Thanks much.  So does dropping work_mem to the default of 1MB sound good?

By moving databases around we're getting max_connections below 600 or 700.

--------------070202080704080208020909--