Re: ubuntu swap space - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: ubuntu swap space
Date
Msg-id 4DA42859020000250003C6F3@gw.wicourts.gov
Whole thread Raw
In response to ubuntu swap space  (Kasia Tuszynska <ktuszynska@esri.com>)
List pgsql-admin
Kasia Tuszynska <ktuszynska@esri.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

pgsql-admin by date:

Previous
From: CS DBA
Date:
Subject: Re: what is a serial_fkey data type?
Next
From: Fábio Gibon - Comex System
Date:
Subject: Re: Shared_buffer limited by SO