From: Simon Riggs <simon@2ndquadrant.com>
To: Kevin Schroeder <kschroeder@mirageworks.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Swapping on Solaris
Date: Wed, 19 Jan 2005 23:47:04 +0000
Message-ID: <1106178424.14384.373.camel@localhost.localdomain> (raw)
In-Reply-To: <014801c4fe3d$2a2478f0$0200a8c0@WORKSTATION>
References: <042a01c4fdaf$fbb3b860$0200a8c0@WORKSTATION>
<41EE0F05.9080901@coretech.co.nz>
<41EE65FC.2000909@rentec.com>
<00d601c4fe33$89682eb0$0200a8c0@WORKSTATION>
<41EE7D19.4060503@rentec.com>
<014801c4fe3d$2a2478f0$0200a8c0@WORKSTATION>
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
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: simon@2ndquadrant.com, kschroeder@mirageworks.com
Subject: Re: Swapping on Solaris
In-Reply-To: <1106178424.14384.373.camel@localhost.localdomain>
* 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