Re: Auto-tuning work_mem and maintenance_work_mem

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
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:40:17
Message-ID: 52572CD1.9020806@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> 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.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-10-10 22:43:42 Re: Auto-tuning work_mem and maintenance_work_mem
Previous Message Bruce Momjian 2013-10-10 22:36:17 Re: Auto-tuning work_mem and maintenance_work_mem