Re: Performance tuning on RedHat Enterprise Linux 3

From: Neil Conway <neilc(at)samurai(dot)com>
To: Paul Tillotson <pntil(at)shentel(dot)net>
Cc: David Esposito <pgsql-general(at)esposito(dot)newnetco(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performance tuning on RedHat Enterprise Linux 3
Date: 2004-12-07 01:02:13
Message-ID: 1102381333.1494.48.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2004-12-06 at 19:37 -0500, Paul Tillotson wrote:
> I seem to remember hearing that the memory limit on certain operations,
> such as sorts, is not "enforced" (may the hackers correct me if I am
> wrong); rather, the planner estimates how much a sort might take by
> looking at the statistics for a table.
>
> If the statistics are wrong, however, the sort doesn't actually stay
> within sort memory, and so the process consumes a very large amount of
> memory, much more than the sort_mem configuration parameter should allow
> it to.

AFAIK this is not the case. sort_mem defines the in-memory buffer used
_per_ sort operation. The problem you may be referring to is that
multiple concurrent sort operations (possibly within a single backend)
will each consume up to sort_mem, so the aggregate memory usage for sort
operations may be significantly higher than sort_mem.

-Neil

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric Davies 2004-12-07 01:11:21 hooks for supporting third party blobs?
Previous Message Doug McNaught 2004-12-07 01:00:27 Re: Network authentication