Re: performance tuning: shared_buffers, sort_mem; swap - Mailing list pgsql-admin

From Tom Lane
Subject Re: performance tuning: shared_buffers, sort_mem; swap
Date
Msg-id 26986.1029256683@sss.pgh.pa.us
Whole thread Raw
In response to Re: performance tuning: shared_buffers, sort_mem; swap  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-admin
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Thomas O'Connell wrote:
>> the caveat was to watch for swap activity when these values were being
>> set. so my question is, how much swapping is too much, and is there a
>> way to determine whether postgres is the process causing the swapping?

> Well, it doesn't really matter who is causing the swapping.  If you have
> more of a load on your machine that RAM can hold, you are better off
> reducing your PostgreSQL shared buffers.

Right.  Any swapping is too much, except maybe under absolute peak load
conditions where you're prepared to accept performance degradation.

If the machine is swapping, that probably means it's already been forced
to skinny kernel disk cache down to the minimum (since kernel disk
buffers normally are allowed to occupy whatever RAM is left over beyond
the needs of active processes).  You want a fat disk cache not a skinny
one ...

            regards, tom lane

pgsql-admin by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: performance tuning: shared_buffers, sort_mem; swap
Next
From: "Robert M. Meyer"
Date:
Subject: Re: Leftover processes on shutdown - Debian+JDBC