Re: ubuntu swap space

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Kasia Tuszynska" <ktuszynska(at)esri(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: ubuntu swap space
Date: 2011-04-12 15:24:25
Message-ID: 4DA42859020000250003C6F3@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Kasia Tuszynska <ktuszynska(at)esri(dot)com> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Donald Fraser 2011-04-12 15:30:33 Re: Missing documentation for error code: 80S01
Previous Message Fábio Gibon - Comex System 2011-04-12 15:24:19 Re: Shared_buffer limited by SO