Skip site navigation (1) Skip section navigation (2)

Re: heavy swapping, not sure why

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Sim Zacks <sim(at)compulab(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: heavy swapping, not sure why
Date: 2011-08-30 09:52:15
Message-ID: CAOR=d=2j0UDG1G_VMJPm9+=d_Q85ZevfvcV+0+hvD2fF7ycw0g@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Tue, Aug 30, 2011 at 2:50 AM, Sim Zacks <sim(at)compulab(dot)co(dot)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.

In response to

Responses

pgsql-general by date

Next:From: Scott MarloweDate: 2011-08-30 09:53:36
Subject: Re: heavy swapping, not sure why
Previous:From: Sim ZacksDate: 2011-08-30 08:50:39
Subject: Re: heavy swapping, not sure why

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group