Re: heavy swapping, not sure why

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Alan Hodgson <ahodgson(at)simkin(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: heavy swapping, not sure why
Date: 2011-08-30 03:09:22
Message-ID: CAOR=d=3orr8ExXVB1xGahabrhmJAi3npw_Z0jTG3yUAg4WAcbQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 29, 2011 at 5:01 PM, Alan Hodgson <ahodgson(at)simkin(dot)ca> wrote:
> On August 29, 2011 02:34:26 PM you wrote:
>> On Mon, Aug 29, 2011 at 3: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.
>>
>> that won't help and, in almost all cases, is a bad idea.
>
> Overly aggressive swapping with the default settings has frequently caused me
> performance issues. Using this prevents those problems.

On a machine with lots of memory, I've run into pathological behaviour
with both the RHEL 5 and Ubuntu 10.04 kernels where the kswapd starts
eating up CPU and swap io like mad, while doing essentially nothing.
Setting swappiness to 0 delayed this behaviour but did not stop it.
Given that I'm on a machine with 128G ram, I just put "/sbin/swapoff
-a" in /etc/rc.local and viola, problem solved.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2011-08-30 05:26:55 Re: heavy swapping, not sure why
Previous Message peixubin 2011-08-30 01:54:26 Re: heavy swapping, not sure why