pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Yen <dba@richyen.com>
To: Scott Carey <scott@richrelevance.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: why does swap not recover?
Date: Sat, 27 Mar 2010 21:08:13 -0700
Message-ID: <8D32F5BC-3E1B-45AF-AA10-DA505EFFF483@richyen.com> (raw)
In-Reply-To: <F7A0C72B-20D5-4A81-853F-014ACC9BA416@richrelevance.com>
References: <04C98397-261D-4A50-99CB-61FA3E4A974B@richyen.com>
	<F7A0C72B-20D5-4A81-853F-014ACC9BA416@richrelevance.com>


On Mar 26, 2010, at 5:25 PM, Scott Carey wrote:
> Linux until recently does not account for shared memory properly in its swap 'aggressiveness' decisions.
> Setting shared_buffers larger than 35% is asking for trouble.
> 
> You could try adjusting the 'swappiness' setting on the fly and seeing how it reacts, but one consequence of that is trading off disk swapping for kswapd using up tons of CPU causing other trouble.
Thanks for the tip.  I believe we've tried tuning the 'swappiness' setting on the fly, but it had no effect.  We're hypothesizing that perhaps 'swappiness' only comes into effect at the beginning of a process, so we would have to restart the daemon to actually make it go into effect--would you know about this?

> Either use one of the last few kernel versions (I forget which addressed the memory accounting issues, and haven't tried it myself), or turn shared_buffers down.  I recommend trying 10GB or so to start.

We're currently using CentOS 2.6.18-164.6.1.el5 with all the default settings.  If this is after the one that dealt with memory accounting issues, I agree that I'll likely have to lower my shared_buffers.

My sysctl.conf shows the following:
> kernel.msgmnb = 65536
> kernel.msgmax = 65536
> kernel.shmmax = 68719476736
> kernel.shmall = 4294967296

BTW, I forgot to mention that I'm using FusionIO drives for my data storage, but I'm pretty sure this is not relevant to the issue I'm having.

Thanks for the help!
--Richard


view thread (7+ messages)  latest in thread

Message-ID: <8D32F5BC-3E1B-45AF-AA10-DA505EFFF483@richyen.com>
Permalink:  ../8D32F5BC-3E1B-45AF-AA10-DA505EFFF483@richyen.com/
Also on:    postgresql.org/message-id/8D32F5BC-3E1B-45AF-AA10-DA505EFFF483@richyen.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: dba@richyen.com, scott@richrelevance.com, scott.marlowe@gmail.com
  Subject: Re: why does swap not recover?
  In-Reply-To: <8D32F5BC-3E1B-45AF-AA10-DA505EFFF483@richyen.com>
  References: <04C98397-261D-4A50-99CB-61FA3E4A974B@richyen.com> <F7A0C72B-20D5-4A81-853F-014ACC9BA416@richrelevance.com> <8D32F5BC-3E1B-45AF-AA10-DA505EFFF483@richyen.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