Re: Swapping on Solaris

From: Alan Stange <stange(at)rentec(dot)com>
To:
Cc: Kevin Schroeder <kschroeder(at)mirageworks(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Swapping on Solaris
Date: 2005-01-19 13:51:56
Message-ID: 41EE65FC.2000909@rentec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mark Kirkwood wrote:

> Kevin Schroeder wrote:
>
>>
>>
>> Ignoring the fact that the sort and vacuum numbers are really high,
>> this is what Solaris shows me when running top:
>>
>> Memory: 2048M real, 1376M free, 491M swap in use, 2955M swap free
>>
> Maybe check the swap usage with 'swap -l' which reports reliably if any
> (device or file) swap is actually used.
>
> I think Solaris 'top' does some strange accounting to calculate the
> 'swap in use' value (like including used memory).
>
> It looks to me like you are using no (device or file) swap at all, and
> have 1.3G of real memory free, so could in fact give Postgres more of
> it :-)

I suspect that "free" memory is in fact being used for the file system
cache. There were some changes in the meaning of "free" in Solaris 8
and 9. The memstat command gives a nice picture of memory usage on the
system. I don't think memstat came with Solaris 8, but you can get it
from solarisinternals.com. The Solaris Internals book is an excellent
read as well; it explains all of this in gory detail.

Note that files in /tmp are usually in a tmpfs file system. These
files may be the usage of swap that you're seeing (as they will be paged
out on an active system with some memory pressure)

Finally, just as everyone suggests upgrading to newer postgresql
releases, you probably want to get to a newer Solaris release.

-- Alan

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Schroeder 2005-01-19 14:31:17 Re: Swapping on Solaris
Previous Message Dave Cramer 2005-01-19 13:41:29 Re: Increasing RAM for more than 4 Gb. using postgresql