Re: Idea about better configuration options for sort - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: Idea about better configuration options for sort
Date
Msg-id 1075832326.308.277.camel@jester
Whole thread Raw
In response to Re: Idea about better configuration options for sort memory  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Idea about better configuration options for sort  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
> > > "scott.marlowe" <scott.marlowe@ihs.com> writes:
> > > > any chance of having some kind of max_total_sort_mem setting to keep
> > > > machines out of swap storms, or would that be a nightmare to implement?

> Someone asked for this in Copenhagen, and I said we can't see how to do
> it.  The only idea I had as to give the first requestor 50% of the
> total, then a second query 50% of the remaining memory.  Is that better
> than what we have?

Lets look at it from another direction. The goal isn't to set a maximum
memory amount, but to avoid swapping.

Add a toggle to PostgreSQL that says (essentially) "I am the only
resource intensive program running".

If this was done, could we not work closer with the kernel? Ask the
kernel how much Free + Buffer memory there is, knock it down by 75% and
use that for our sort memory value (total sort memory for individual
backend -- not operation).

--
Rod Taylor <rbt [at] rbt [dot] ca>

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/rbtpub.asc

pgsql-hackers by date:

Previous
From: lima_caetano@yahoo.com.br (Marcio Caetano)
Date:
Subject: Multicolumn Indexing using R-Tree
Next
From: Paul Ramsey
Date:
Subject: Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4]