Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 90BA31337B4E for ; Tue, 12 Apr 2011 12:24:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 25136-04 for ; Tue, 12 Apr 2011 15:24:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id C283F1337A5D for ; Tue, 12 Apr 2011 12:24:28 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 12 Apr 2011 10:24:27 -0500 Message-Id: <4DA42859020000250003C6F3@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 12 Apr 2011 10:24:25 -0500 From: "Kevin Grittner" To: "Kasia Tuszynska" , "pgsql-admin@postgresql.org" Subject: Re: ubuntu swap space References: <232B5217AD58584C87019E8933556D110227AF1D70@redmx2.esri.com> In-Reply-To: <232B5217AD58584C87019E8933556D110227AF1D70@redmx2.esri.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/108 X-Sequence-Number: 37289 Kasia Tuszynska wrote: > We are configuring Postgres on Ubuntu > Nothing but Postgres will be running on the machine. I have read > that we should assign twice the available RAM to swap, that seems > like a lot. I remember years ago reading that if swap space was twice RAM, that Linux could use a different algorithm for swapping, which was generally expected to be faster. I don't know whether that is still true. > Would Postgres ever use so much space? It could, in certain conditions, but you would probably not like the performance. You're best off avoiding overcommitting memory to that extent. > Any recommendations or best practices? I would follow the general recommendations for the OS, and worry about tuning PostgreSQL memory usage so that you don't drive anything significant into swap space. On our production systems we generally see a very small amount swapped out fairly early which doesn't grow and is never swapped back in. I suspect it is OS-related code which we're not using. -Kevin