Skip site navigation (1) Skip section navigation (2)

Re: 2GB or not 2GB

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: <josh(at)agliodbs(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: 2GB or not 2GB
Date: 2008-05-29 00:25:57
Message-ID: 87d4n6nega.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-performance
"Josh Berkus" <josh(at)agliodbs(dot)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

In response to

pgsql-performance by date

Next:From: Greg SmithDate: 2008-05-29 01:06:06
Subject: Re: 2GB or not 2GB
Previous:From: Steve CrawfordDate: 2008-05-29 00:04:37
Subject: Re: 2GB or not 2GB

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group