Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbXYH-00046f-Hm for pgsql-admin@arkaria.postgresql.org; Wed, 30 Oct 2013 15:19:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VbXYG-0000Vo-Sw for pgsql-admin@arkaria.postgresql.org; Wed, 30 Oct 2013 15:19:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbXYF-0000Vh-Pg for pgsql-admin@postgresql.org; Wed, 30 Oct 2013 15:19:19 +0000 Received: from nm35.bullet.mail.ne1.yahoo.com ([98.138.229.28]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbXY3-0004kF-Fp for pgsql-admin@postgresql.org; Wed, 30 Oct 2013 15:19:18 +0000 Received: from [127.0.0.1] by nm35.bullet.mail.ne1.yahoo.com with NNFMP; 30 Oct 2013 15:19:04 -0000 Received: from [98.138.226.178] by nm35.bullet.mail.ne1.yahoo.com with NNFMP; 30 Oct 2013 15:15:48 -0000 Received: from [66.196.81.172] by tm13.bullet.mail.ne1.yahoo.com with NNFMP; 30 Oct 2013 15:14:10 -0000 Received: from [98.139.212.232] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 30 Oct 2013 15:14:10 -0000 Received: from [127.0.0.1] by omp1041.mail.bf1.yahoo.com with NNFMP; 30 Oct 2013 15:14:10 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 492813.99516.bm@omp1041.mail.bf1.yahoo.com Received: (qmail 1131 invoked by uid 60001); 30 Oct 2013 15:14:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1383146050; bh=DUUP8vlKTkm/LgSYyANz1D0mESo7we5PosTUzpkzouw=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=qp+Cr6xU4EhvRrZ+f1+5B37EQPtNAlr7pBTdnfEA4X5GHQYCRasvylsYdgm9D4uHA8W246O6r1tW1L9+OQfnhx4jb63jzNpjJmEojuW227HBOhGwdE5K5Zi+J6YBSRwQou1DXFR1ureP2V3EuCSBs0E0mtiCbREQ4AC5Cns/5Zc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=P6vi9VHQM7HiIMS1YNIHXh0cft71Qsl1H86+lL1j5Mm/WVyLCpSXSfNqnD/zRuAK1V0fm2lQFySlVKMQdUlX7FGSxBiryMEB22riK8eYgLKdAQNxvvtLyqfYoFl5aQ77U9S+VQd2h2UarL1Q+000XqS73JdX35yimgDHmMd9PkM=; X-YMail-OSG: zeE2hxQVM1ltKRFzUKx4_5Tc02M0p8zP6qnQiE0VtBYN10z 7R1eIWyWdoVQZus1m2gupx5hy8hPVPxog0AHF_UQaxm9V.Q-- Received: from [76.255.18.237] by web162906.mail.bf1.yahoo.com via HTTP; Wed, 30 Oct 2013 08:14:09 PDT X-Rocket-MIMEInfo: 002.001, 0JXQstCz0LXQvdC40Lkg0KHQtdC70Y_QstC60LAgPGV2Zy5zZWx5YXZrYUBnbWFpbC5jb20.IHdyb3RlOgoKPiBTZXJ2ZXIgSFc6Cgo.IDMyR0IgUkFNCgo.IEJlZm9yZSBzZXJ2ZXIgY3Jhc2ggaSBoYXZlIHRoaXMgcGFyYW1ldGVycyBpbiBjb25maWc6Cj4KPiBtYXhfY29ubmVjdGlvbnMgPSAzNTAKCj4gd29ya19tZW0gPSAyR0IKCj4gQWZ0ZXIgY3Jhc2jCoCBpIGNoYW5nZSB0aGlzIHBhcmFtZXRlcnM6Cgo.IHdvcmtfbWVtID0gMUdCCgpBIGdvb2QgInJ1bGUgb2YgdGh1bWIiIGlzIHRvIGFsbG93IGZvciABMAEBAQE- X-Mailer: YahooMailWebService/0.8.160.587 References: Message-ID: <1383146049.700.YahooMailNeo@web162906.mail.bf1.yahoo.com> Date: Wed, 30 Oct 2013 08:14:09 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: postgresql 9.1 out of memory To: =?utf-8?B?0JXQstCz0LXQvdC40Lkg0KHQtdC70Y/QstC60LA=?= , "pgsql-admin@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org =D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9 =D0=A1=D0=B5=D0=BB=D1=8F=D0=B2= =D0=BA=D0=B0 wrote: > Server HW: > 32GB RAM > Before server crash i have this parameters in config: > > max_connections =3D 350 > work_mem =3D 2GB > After crash=C2=A0 i change this parameters: > work_mem =3D 1GB A good "rule of thumb" is to allow for one work_mem allocation per connection for a reasonable estimation of peak memory usage for this purpose.=C2=A0 (This may need to be adjusted based on workload, but it's a reasonable place to start.)=C2=A0 So you have adjusted likely peaks down from 700GB to 350GB. I usually start with work_mem set to RAM * 25% / max_connections. In your case that works out to 23MB.=C2=A0 If you are able to use a connection pooler to reducee max_connections, that will allow you to boost work_mem. --=20 Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin