From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Auto-tuning work_mem and maintenance_work_mem |
Date: | 2013-10-10 22:45:23 |
Message-ID: | 20131010224523.GX7092@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 10, 2013 at 03:40:17PM -0700, Josh Berkus wrote:
>
> >> I don't follow that. Why would using a connection pooler change the multiples
> >> of work_mem that a connection would use?
> >
> > I assume that a connection pooler would keep processes running longer,
> > so even if they were not all using work_mem, they would have that memory
> > mapped into the process, and perhaps swapped out.
>
> Yes, and then this is when it *really* matters what OS you're running,
> and what release. FreeBSD and Solaris++ don't overallocate RAM, so
> those long-running connections pin a lot of RAM eventually. And for
> Linux, it's a question of how aggressive the OOM killer is, which kinda
> depends on distro/version/sysadmin settings.
>
> When I configure pgbouncer for Illumos users, I specifically have it
> rotate out old connections once an hour for this reason.
Just as a point of education, this is a good idea why you want to
allocate swap even if you expect your workload to fit in memory.
Pushing unused memory to swap is a good use of swap.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2013-10-10 22:48:47 | Re: ENABLE/DISABLE CONSTRAINT NAME |
Previous Message | Bruce Momjian | 2013-10-10 22:43:42 | Re: Auto-tuning work_mem and maintenance_work_mem |