Re: Auto-tuning work_mem and maintenance_work_mem - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Auto-tuning work_mem and maintenance_work_mem
Date
Msg-id CA+TgmoYg1+tvvO05Lwc2uHY6fbFpxkCaL3fh2JKrXNQJGCa-RQ@mail.gmail.com
Whole thread Raw
In response to Re: Auto-tuning work_mem and maintenance_work_mem  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On Thu, Oct 10, 2013 at 6:27 PM, Josh Berkus <josh@agliodbs.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Auto-tuning work_mem and maintenance_work_mem
Next
From: Peter Eisentraut
Date:
Subject: Re: GIN improvements part 1: additional information