Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id AFEDD1337B47 for ; Tue, 12 Apr 2011 12:33:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 56669-05 for ; Tue, 12 Apr 2011 15:32:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f46.google.com (mail-ew0-f46.google.com [209.85.215.46]) by mail.postgresql.org (Postfix) with ESMTP id E8C021337990 for ; Tue, 12 Apr 2011 12:32:57 -0300 (ADT) Received: by ewy4 with SMTP id 4so2062070ewy.19 for ; Tue, 12 Apr 2011 08:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=qNQ1SaWCFByVUBf1KPZM8yLJoNM+bPVnXeK+zNvqWVk=; b=nLoxO2upwSwzqR9hkd5YsNsB/qBxI057wtgmGs6idofr75KeUZ9DuKHH9+EgsAaNGv U/nb5QKxUDQWiZyOcjDC1F9OvvXKEFuSV3t4kWsDx3Q4K17O3GDGJWBjWY9Z6N6oSow5 XPzgQkrMbdEOPPLEnLV0wfuur7d3TWOHJAmuI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mpUByTzqjsZ0nWHKo2uX9V/7lSH7my0Ocw7M2cUdOgYSg7F8XnciH6EC1TKwVUaYVG Y5X2UBj8f6krnDhmrbz0Rvvlqa2us4iTrBtLV5ilcNxXbVNl+A3CO0LVN+9AvBHCxgvx pRT6n5Ltsolq5UBi1pq7s5AewQYdmiyBr4IdI= MIME-Version: 1.0 Received: by 10.213.27.14 with SMTP id g14mr1625434ebc.90.1302622376403; Tue, 12 Apr 2011 08:32:56 -0700 (PDT) Received: by 10.213.9.207 with HTTP; Tue, 12 Apr 2011 08:32:56 -0700 (PDT) In-Reply-To: <232B5217AD58584C87019E8933556D110227AF1D70@redmx2.esri.com> References: <232B5217AD58584C87019E8933556D110227AF1D70@redmx2.esri.com> Date: Tue, 12 Apr 2011 09:32:56 -0600 Message-ID: Subject: Re: ubuntu swap space From: Scott Marlowe To: Kasia Tuszynska Cc: "pgsql-admin@postgresql.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201104/111 X-Sequence-Number: 37292 On Tue, Apr 5, 2011 at 5:34 PM, Kasia Tuszynska wrote: > Hello Admin Group: > > We are configuring Postgres on Ubuntu (LLynx) and trying to figure out what > is the best way of dealing with swap since, Ubuntu does not automatically > come with swap storage assigned. > > 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. > > Would Postgres ever use so much space? I understand if I were to load > records that were gigs in size but that is very rare or at least I do not > expect it in my case. > > > > Any recommendations or best practices? We have two machines each with 128G, and we had to turn off swap due to the kswapd going crazy and constantly trying to use swap it didn't need. Brought our production dbs to a crawl. My recommendation is to have enough memory to not ever need swap space if you can afford it.