Re: Auto-tuning work_mem and maintenance_work_mem

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>
Subject: Re: Auto-tuning work_mem and maintenance_work_mem
Date: 2013-10-09 19:07:55
Message-ID: 20131009190755.GC3825719@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-10-09 10:02:12 -0700, Joshua D. Drake wrote:
>
> On 10/09/2013 07:58 AM, Bruce Momjian wrote:
>
> >>But it still is an independent parameter. I am just changing the default.
> >>
> >>>maintenance_work_mem can depend on work_mem ~ work_mem * 1 * max_connection / 4
> >>
> >>That is kind of hard to do because we would have to figure out if the
> >>old maintenance_work_mem was set from a default computation or by the
> >>user.
> >
> >FYI, this auto-tuning is not for us, who understand the parameters and
> >how they interact, but for the 90% of our users who would benefit from
> >better defaults. It is true that there might now be cases where you
> >would need to _reduce_ work_mem from its default, but I think the new
> >computed default will be better for most users.
> >
>
> Just to step in here as a consultant. Bruce is right on here. Autotuning has
> nothing to do with us, it has to do with Rails developers who deploy
> PostgreSQL and known nothing of it except what ActiveRecord tells them (I am
> not being rude here).

But rails environments aren't exactly a good case for this. They often
have a high number of connection that's even pooled. They also mostly
don't have that many analytics queries where a high work_mem benefits
them much.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-10-09 19:25:42 Re: Patch: FORCE_NULL option for copy COPY in CSV mode
Previous Message Robert Haas 2013-10-09 18:56:48 Re: Backup throttling