From: Gregory Stark <stark@enterprisedb.com>
To: josh@agliodbs.com
Cc: pgsql-performance@postgresql.org
Subject: Re: 2GB or not 2GB
Date: Wed, 28 May 2008 20:25:57 -0400
Message-ID: <87d4n6nega.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <200805281659.26945.josh@agliodbs.com>
References: <200805281659.26945.josh@agliodbs.com>
"Josh Berkus" <josh@agliodbs.com> writes:
> sort_mem: My tests with 8.2 and DBT3 seemed to show that, due to
> limitations of our tape sort algorithm, allocating over 2GB for a single
> sort had no benefit. However, Magnus and others have claimed otherwise.
> Has this improved in 8.3?
Simon previously pointed out that we have some problems in our tape sort
algorithm with large values of work_mem. If the tape is "large enough" to
generate some number of output tapes then increasing the heap size doesn't buy
us any reduction in the future passes. And managing very large heaps is a
fairly large amount of cpu time itself.
The problem of course is that we never know if it's "large enough". We talked
at one point about having a heuristic where we start the heap relatively small
and double it (adding one row) whenever we find we're starting a new tape. Not
sure how that would work out though.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: stark@enterprisedb.com, josh@agliodbs.com
Subject: Re: 2GB or not 2GB
In-Reply-To: <87d4n6nega.fsf@oxford.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox