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

From Josh Berkus
Subject Re: Auto-tuning work_mem and maintenance_work_mem
Date
Msg-id 52578AA4.80707@agliodbs.com
Whole thread Raw
In response to Re: Auto-tuning work_mem and maintenance_work_mem  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Auto-tuning work_mem and maintenance_work_mem
List pgsql-hackers
Robert,

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

That's the problem: It Depends.

One thing in particular which is an issue with calculating against
max_connections is that users who don't need 100 connections seldom
*reduce* max_connections.  So that developer laptop which only needs 3
connections is still going to have a max_connections of 100, just like
the DW server where m_c should probably be 30.

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

Seems fine to me.

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



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: space reserved for WAL record does not match what was written: panic on windows
Next
From: Pavel Stehule
Date:
Subject: Re: WITHIN GROUP patch