Re: heavy swapping, not sure why

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Lonni J Friedman <netllama(at)gmail(dot)com>
Cc: Alan Hodgson <ahodgson(at)simkin(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: heavy swapping, not sure why
Date: 2011-08-29 21:24:19
Message-ID: CAOR=d=07fD-47eRwjO_EYQvoA6fzTrApEWo_zbL8rNrjtBYefw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 29, 2011 at 2:57 PM, Lonni J Friedman <netllama(at)gmail(dot)com> wrote:
> On Mon, Aug 29, 2011 at 1:46 PM, Alan Hodgson <ahodgson(at)simkin(dot)ca> wrote:
>> On August 29, 2011 01:36:07 PM Lonni J Friedman wrote:
>>> I have several Linux-x68_64 based dedicated PostgreSQL servers where
>>> I'm experiencing significant swap usage growth over time.
>>
>> It's the Linux kernel that does it, not PostgreSQL. Set vm.swappiness=0
>> (usually in /etc/sysctl.conf) and put that into effect.
>
> I understand that the kernel determines what is swapped out, however
> postgres is what is using nearly all the RAM, and then overflowing
> into swap.  I guess I should have noted that this isn't a case of a
> significant amount of RAM not being used, and swapping occurring
> anyway.  Most of the RAM is already consumed when the heavy swapping
> is happening.  So, I'd be surprised if setting vm.swappiness=0 will
> make a significant difference, however I can certainly try.

You haven't shown us how you determined this, it would be nice to see
some copy and paste of things like top, free, or whatever. How much
free AND cache is left over when the machine starts to run out of
memory etc.

Your settings for shared_memory are HUGE. I run a machine witih 128G
of ram and my shared_memory is 8G and that's quite large. No testing
anyone has done has shown anything over 10G being useful.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-08-29 21:34:26 Re: heavy swapping, not sure why
Previous Message Scott Marlowe 2011-08-29 21:17:56 Re: dropdb: database removal failed: active sessions