From: Robert Haas <robertmhaas@gmail.com>
To: Richard Yen <dba@richyen.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: why does swap not recover?
Date: Tue, 30 Mar 2010 10:57:44 -0400
Message-ID: <603c8f071003300757s39a9096eyc6ce6af4ecb396ff@mail.gmail.com> (raw)
In-Reply-To: <04C98397-261D-4A50-99CB-61FA3E4A974B@richyen.com>
References: <04C98397-261D-4A50-99CB-61FA3E4A974B@richyen.com>
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-purpose machine) or less (pgtune recommends 14GB for an OLTP machine). However, before I do this (and possibly resolve the issue), I was hoping to see if anyone would have an explanation for the constant reading from swap, but never writing 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: robertmhaas@gmail.com, dba@richyen.com
Subject: Re: why does swap not recover?
In-Reply-To: <603c8f071003300757s39a9096eyc6ce6af4ecb396ff@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox