Re: Swapping on Solaris

From: "Kevin Schroeder" <kschroeder(at)mirageworks(dot)com>
To:
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Swapping on Solaris
Date: 2005-01-19 17:08:51
Message-ID: 019701c4fe49$8c72d4a0$0200a8c0@WORKSTATION
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I think it's probably just reserving them. I can't think of anything else.
Also, when I run swap activity with sar I don't see any activity, which also
points to reserved swap space, not used swap space.

swap -s reports

total: 358336k bytes allocated + 181144k reserved = 539480k used, 2988840k
available

Kevin

----- Original Message -----
From: "Alan Stange" <stange(at)rentec(dot)com>
To: "Kevin Schroeder" <kschroeder(at)mirageworks(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Sent: Wednesday, January 19, 2005 11:04 AM
Subject: Re: [PERFORM] Swapping on Solaris

> 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.
>
> The test you're doing doesn't measure what you think you're measuring.
>
> First, what else is running on the machine? Note that some shared
> memory allocations do reserve backing pages in swap, even though the pages
> aren't currently in use. Perhaps this is what you're measuring?
> "swap -s" has better numbers than top.
>
> You'd be better by trying a reboot then starting pgsql and seeing what
> memory is used.
>
> Just because you start a process and see the swap number increase doesn't
> mean that the new process is in swap. It means some anonymous pages had
> to be evicted to swap to make room for the new process or some pages had
> to be reserved in swap for future use. Typically a new process won't be
> paged out unless something else is causing enormous memory pressure...
>
> -- Alan
>
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff 2005-01-19 17:36:54 Re: Swapping on Solaris
Previous Message Alan Stange 2005-01-19 17:04:21 Re: Swapping on Solaris