Re: why does swap not recover? - Mailing list pgsql-performance

From Robert Haas
Subject Re: why does swap not recover?
Date
Msg-id 603c8f071003300757s39a9096eyc6ce6af4ecb396ff@mail.gmail.com
Whole thread Raw
In response to why does swap not recover?  (Richard Yen <dba@richyen.com>)
List pgsql-performance
On Fri, Mar 26, 2010 at 7:57 PM, Richard Yen <dba@richyen.com> wrote:
> Note that it is constantly paging in, but never paging out.  This would indicate that it's constantly reading from
swap,but never writing out to it.  Why would postgres do this? (postgres is pretty much the only thing running on this
machine).
>
> I'm planning on lowering the shared_buffers to a more sane value, like 25GB (pgtune recommends this for a
Mixed-purposemachine) or less (pgtune recommends 14GB for an OLTP machine).  However, before I do this (and possibly
resolvethe issue), I was hoping to see if anyone would have an explanation for the constant reading from swap, but
neverwriting back. 

Reading a page in from swap still leaves that data on the disk.  So it
may be that you're reading in pages from disk, not modifying them,
discarding them (without any need to write them out since they're
still on disk), and then reading them in again when they're accessed
again.

...Robert

pgsql-performance by date:

Previous
From: Robert Haas
Date:
Subject: Re: Why Wal_buffer is 64KB
Next
From: "Kevin Grittner"
Date:
Subject: Re: REINDEXing database-wide daily