Suggested swap size for new db?

From: "Evan D(dot) Hoffman" <evandhoffman(at)gmail(dot)com>
To: Postgresql Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Suggested swap size for new db?
Date: 2010-11-15 03:34:01
Message-ID: AANLkTimpjyaKRmg5-HAoLq+SDoEWnwHTxi5zOBnnrcpr@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm planning to migrate our pg db to a new machine in the next couple
of weeks. The current DB has 32 GB memory; the new one will have 96
GB. It's going to be Postgres 8.2.x (we're planning to upgrade to 8.4
as part of another project) running on CentOS 5.4 or 5.5. I know the
old rule of thumb that your swap partition/disk should be equal to the
physical memory, but when dealing with memory sizes greater than ~16
GB that starts to seem strange to me; and now with 96 GB of physical
memory I'm starting to wonder if I'd be better off forgoing swap
altogether for the new database.

Are there any general suggestions for swap size for a Postgres DB? I
assume that paging to/from disk is something that I'd want to avoid,
especially in a database (which is why I'm debating disabling it
altogether), but I'm not sure what the drawbacks would be (aside from
the obvious one of there being less total memory available to the
system). Oracle actually has some guidelines for swap space in the
installation docs -
http://www.dba-oracle.com/t_server_swap_space_allocation.htm - but I
don't know of anything similar for Postgres, and I don't know if/how
having such a huge amount of memory affects those guidelines. 3/4 of 8
GB is 6 GB of swap, which seems reasonable; 3/4 of 96 GB is 72 GB,
which strikes me as excessive.

Any thoughts would be appreciated.

Thanks,
Evan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2010-11-15 06:47:17 Re: Suggested swap size for new db?
Previous Message Gabriele Bartolini 2010-11-15 02:40:29 Re: when postgres failed to recover after the crash...