Re: Swapping on Solaris

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Kevin Schroeder <kschroeder(at)mirageworks(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Swapping on Solaris
Date: 2005-01-19 23:47:04
Message-ID: 1106178424.14384.373.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 2005-01-19 at 09:40 -0600, Kevin Schroeder wrote:
> I may be asking the question the wrong way, but when I start up PostgreSQL
> swap is what gets used the most of. I've got 1282MB free RAM right now and
> and 515MB swap in use. Granted, swap file usage probably wouldn't be zero,
> but I would guess that it should be a lot lower so something must be keeping
> PostgreSQL from using the free RAM that my system is reporting. For
> example, one of my postgres processes is 201M in size but on 72M is resident
> in RAM. That extra 130M is available in RAM, according to top, but postgres
> isn't using it.

You probably need to look at the way Solaris memory allocation works.

On Linux 2.6, my understanding is that if a process allocates memory,
but doesn't actually use it, then the OS is smart enough to swap the
overallocated portion out to swap. The effect of that is that the
program stays happy because it has all the "memory" it thinks it needs,
while the OS is happy because it conserves it valuable physical RAM for
memory that is actually being used.

If what I say is correct, you should actually observe very low swapping
I/O rates on the system.

Anyway, look at how the algorithms work if you are worried by what you
see. But mostly, if the system is performing OK, then no need to worry -
if your only measure of that is system performance data then you need to
instrument your application better, so you can look at the data that
really matters.

--
Best Regards, Simon Riggs

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Benjamin Wragg 2005-01-20 00:55:37 Re: Disk configuration
Previous Message Benjamin Wragg 2005-01-19 22:31:16 areca raid controller