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