Swapping on Solaris

From: "Kevin Schroeder" <kschroeder(at)mirageworks(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Swapping on Solaris
Date: 2005-01-18 22:49:35
Message-ID: 042a01c4fdaf$fbb3b860$0200a8c0@WORKSTATION
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello,
I'm running PostgreSQL on a Solaris 8 system with 2GB of RAM and I'm
having some difficulty getting PostgreSQL to use the available RAM. My RAM
settings in postgresql.conf are

shared_buffers = 8192 # min 16, at least max_connections*2, 8KB each
sort_mem = 131072 # min 64, size in KB
vacuum_mem = 131072 # min 1024, size in KB

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

For some reason I have 1.25GB of free RAM but PostgreSQL seems compelled to
swap to the hard drive rather than use that RAM. I have the shared buffers
set as high as the Solaris kernel will let me. I also know that Solaris
will cache frequently used files in RAM, thereby lowering the amount of RAM
available to an application, but my understanding is that Solaris will dump
that cache if an application or the kernel itself requires it.

The system has about 1,000 active email users using unix mailboxes which
could what is keeping the database from exploiting as much RAM as available
but my primary concern is to allow PostgreSQL to use as much RAM as it
requires without swapping.

What can I do to force the system to allow PostgreSQL to do this?

Regards,
Kevin Schroeder

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2005-01-19 07:40:53 Re: Swapping on Solaris
Previous Message Josh Berkus 2005-01-18 22:49:21 Re: Disk configuration