Re: Auto-tuning work_mem and maintenance_work_mem

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Christopher Browne <cbbrowne(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Auto-tuning work_mem and maintenance_work_mem
Date: 2013-10-11 00:56:23
Message-ID: CA+TgmoYg1+tvvO05Lwc2uHY6fbFpxkCaL3fh2JKrXNQJGCa-RQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 10, 2013 at 6:27 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>> More generally, Josh has made repeated comments that various proposed
>> value/formulas for work_mem are too low, but obviously the people who
>> suggested them didn't think so. So I'm a bit concerned that we don't
>> all agree on what the end goal of this activity looks like.
>
> The counter-proposal to "auto-tuning" is just to raise the default for
> work_mem to 4MB or 8MB. Given that Bruce's current formula sets it at
> 6MB for a server with 8GB RAM, I don't really see the benefit of going
> to a whole lot of code and formulas in order to end up at a figure only
> incrementally different from a new static default.

Agreed. But what do you think the value SHOULD be on such a system?

I suggest that it's pretty reasonable to assume that even a
developer's personal machine will likely have 8GB or so by the time
PostgreSQL comes out, so tuning work_mem on that basis is not
unreasonable. Plus, even if it has less, a developer probably won't
have 100 connections.

I guess the point I'm making here is that raising the default value is
not mutually exclusive with auto-tuning. We could quadruple the
current defaults for work_mem and maintenance_work_mem and be better
off right now, today. Then, we could improve things further in the
future if and when we agree on an approach to auto-tuning. And people
who don't use the auto-tuning will still have a better default.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-10-11 01:09:26 Re: GIN improvements part 1: additional information
Previous Message Robert Haas 2013-10-11 00:51:01 Re: Auto-tuning work_mem and maintenance_work_mem