Linux machine aggressively clearing cache - Mailing list pgsql-performance

From Joshua Berkus
Subject Linux machine aggressively clearing cache
Date
Msg-id 160356272.159746.1332878777645.JavaMail.root@mail-1.01.com
Whole thread Raw
Responses Re: Linux machine aggressively clearing cache  (Claudio Freire <klaussfreire@gmail.com>)
Re: Linux machine aggressively clearing cache  (Dave Crooke <dcrooke@gmail.com>)
List pgsql-performance
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
20GBto 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
rapidlycleared 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

pgsql-performance by date:

Previous
From: Joshua Berkus
Date:
Subject: Re: Determining working set size
Next
From: Claudio Freire
Date:
Subject: Re: Linux machine aggressively clearing cache