pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Schroeder <kschroeder@mirageworks.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Swapping on Solaris
Date: Wed, 19 Jan 2005 08:31:17 -0600
Message-ID: <00d601c4fe33$89682eb0$0200a8c0@WORKSTATION> (raw)
References: <042a01c4fdaf$fbb3b860$0200a8c0@WORKSTATION>
	<41EE0F05.9080901@coretech.co.nz>
	<41EE65FC.2000909@rentec.com>

I suspect that the memory is being used to cache files as well since the 
email boxes are using unix mailboxes, for the time being.  With people 
checking their email sometimes once per minute I can see why Solaris would 
want to cache those files.  Perhaps my question would be more appropriate to 
a Solaris mailing list since what I really want to do is get Solaris to 
simply allow PostgreSQL to use more RAM and reduce the amount of RAM used 
for file caching.  I would have thought that Solaris gives some deference to 
a running application that's being swapped than for a file cache.

Is there any way to set custom parameters on Solaris' file-caching behavior 
to allow PostgreSQL to use more physical RAM?

I will also check out memstat.  It's not on my system, but I'll get it from 
the site you noted.

Thanks
Kevin


----- Original Message ----- 
From: "Alan Stange" <stange@rentec.com>
Cc: "Kevin Schroeder" <kschroeder@mirageworks.com>; 
<pgsql-performance@postgresql.org>
Sent: Wednesday, January 19, 2005 7:51 AM
Subject: Re: [PERFORM] Swapping on Solaris


> 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
>
>
> 




view thread (22+ messages)  latest in thread

Message-ID: <00d601c4fe33$89682eb0$0200a8c0@WORKSTATION>
Permalink:  ../00d601c4fe33$89682eb0$0200a8c0@WORKSTATION/
Also on:    postgresql.org/message-id/00d601c4fe33$89682eb0$0200a8c0@WORKSTATION

 · 

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: kschroeder@mirageworks.com
  Subject: Re: Swapping on Solaris
  In-Reply-To: <00d601c4fe33$89682eb0$0200a8c0@WORKSTATION>

* 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