pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Copeland <greg@copelandconsulting.net>
To: Doug Y <dylists@ptd.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Clarification on some settings
Date: Thu, 13 May 2004 15:28:11 -0500
Message-ID: <1084480091.2227.20.camel@shrew.copelandconsulting.net> (raw)
In-Reply-To: <6.0.1.1.2.20040513153548.01edaec0@mail.ptd.net>
References: <6.0.1.1.2.20040513153548.01edaec0@mail.ptd.net>

On Thu, 2004-05-13 at 14:42, Doug Y wrote:


> We don't seem to be swapping much:
> 

Linux aggressively swaps.  If you have any process in memory which is
sleeping a lot, Linux may actively attempt to page it out.  This is true
even when you are not low on memory.  Just because you see some swap
space being used, does not mean that your actively running processes are
causing your system to swap.

I didn't catch what kernel version you are running, so I'm tossing this
out there.  Depending on the kernel (I believe 2.6+, but there may be
something like it in older kernels) that you are running, you can
attempt to tune this buy setting a value of 0-100 in
/proc/sys/vm/swappiness.  The higher the number, the more aggressive the
kernel will attempt to swap.  Some misc. kernel patches attempt to
dynamically tune this parameter.

For a dedicated DB server, a higher number will probably be better. 
This is because it should result in the most cache being available to
the system.  This, of course means, you may have to wait an tad bit long
when you ssh into the system, assuming sshd was swapped out.  I think
you get the idea.


> Swap: 1052248K av,    1092K used, 1051156K free                 1465112K cached
> 
> looks like at some point it did swap a little, but from running vmstat, I 
> can't seem to catch it actively swapping.
> 

Chances are, you have some dormant process which is partially or
completely paged out.

For an interesting read on Linux and swapping, you can find out more
here:  http://kerneltrap.org/node/view/3080.

Cheers!

-- 
Greg Copeland, Owner
greg@copelandconsulting.net
Copeland Computer Consulting
940.206.8004





view thread (6+ messages)

Message-ID: <1084480091.2227.20.camel@shrew.copelandconsulting.net>
Permalink:  ../1084480091.2227.20.camel@shrew.copelandconsulting.net/
Also on:    postgresql.org/message-id/1084480091.2227.20.camel@shrew.copelandconsulting.net

 · 

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: greg@copelandconsulting.net, dylists@ptd.net
  Subject: Re: Clarification on some settings
  In-Reply-To: <1084480091.2227.20.camel@shrew.copelandconsulting.net>

* 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