Re: Clarification on some settings

From: Greg Copeland <greg(at)copelandconsulting(dot)net>
To: Doug Y <dylists(at)ptd(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Clarification on some settings
Date: 2004-05-13 20:28:11
Message-ID: 1084480091.2227.20.camel@shrew.copelandconsulting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)copelandconsulting(dot)net
Copeland Computer Consulting
940.206.8004

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message James Thornton 2004-05-13 21:02:08 Re: [PERFORM] Quad processor options - summary
Previous Message Doug Y 2004-05-13 19:42:20 Re: Clarification on some settings