pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua Berkus <josh@agliodbs.com>
To: postgres performance list <pgsql-performance@postgresql.org>
Subject: Linux machine aggressively clearing cache
Date: Tue, 27 Mar 2012 15:06:17 -0500 (CDT)
Message-ID: <160356272.159746.1332878777645.JavaMail.root@mail-1.01.com> (raw)
In-Reply-To: <958857849.158900.1332878339328.JavaMail.root@mail-1.01.com>

Have run across some memory behavior on Linux I've never seen before.

Server running RHEL6 with 96GB of RAM.  
Kernel 2.6.32
PostgreSQL 9.0
208GB database with fairly random accesses over 50% of the database.

Now, here's the weird part: even after a week of uptime, only 21 to 25GB of cache is ever used, and there's constantly 20GB to 35GB free memory.  This would mean a small working set, except that we see constant reads from disk (1 to 15MB/s) and around 1/3 of queries are slowed by iowaits.

In an effort to test this, we deliberately ran a pg_dump.  This did grow the cache to all available memory, but Linux rapidly cleared the cache (flushing to disk) down to 25GB within an hour.

sys.kernel.vm parameters are all defaults.  None of the parameters seem to specifically relate to the size of the page cache.

Has anyone ever seen this before?  What did you do about it?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
San Francisco



view thread (8+ messages)  latest in thread

Message-ID: <160356272.159746.1332878777645.JavaMail.root@mail-1.01.com>
Permalink:  ../160356272.159746.1332878777645.JavaMail.root@mail-1.01.com/
Also on:    postgresql.org/message-id/160356272.159746.1332878777645.JavaMail.root@mail-1.01.com

 · 

reply

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: josh@agliodbs.com
  Subject: Re: Linux machine aggressively clearing cache
  In-Reply-To: <160356272.159746.1332878777645.JavaMail.root@mail-1.01.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