Re: heavy swapping, not sure why - Mailing list pgsql-general

From Scott Marlowe
Subject Re: heavy swapping, not sure why
Date
Msg-id CAOR=d=2j0UDG1G_VMJPm9+=d_Q85ZevfvcV+0+hvD2fF7ycw0g@mail.gmail.com
Whole thread Raw
In response to Re: heavy swapping, not sure why  (Sim Zacks <sim@compulab.co.il>)
Responses Re: heavy swapping, not sure why
List pgsql-general
On Tue, Aug 30, 2011 at 2:50 AM, Sim Zacks <sim@compulab.co.il> wrote:
>
> 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.
>
> I've tried running without swap and the problem is if you actually do run
> out of memory then the process killer can take out your postgresql.

My postgres is configured to never use more than 10 or 20 gig at max
load.  That leaves about 80+Gig for caching the database by the
kernel.  work_mem is pretty small (8MB) given the maximum connections
(1000) So 8Gig if everybody sorts at once.  Even under very heavy load
memory usage has never really gone anywhere near that high.

pgsql-general by date:

Previous
From: Sim Zacks
Date:
Subject: Re: heavy swapping, not sure why
Next
From: Scott Marlowe
Date:
Subject: Re: heavy swapping, not sure why