Skip site navigation (1) Skip section navigation (2)

Linux machine aggressively clearing cache

From: Joshua Berkus <josh(at)agliodbs(dot)com>
To: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Linux machine aggressively clearing cache
Date: 2012-03-27 20:06:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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 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.
San Francisco


pgsql-performance by date

Next:From: Claudio FreireDate: 2012-03-27 20:10:27
Subject: Re: Linux machine aggressively clearing cache
Previous:From: Joshua BerkusDate: 2012-03-27 19:58:22
Subject: Re: Determining working set size

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group