From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Campbell, Lance <lance@uiuc.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: work_mem and shared_buffers
Date: Fri, 09 Nov 2007 17:56:30 +0000
Message-ID: <47349F4E.5070204@enterprisedb.com> (raw)
In-Reply-To: <B10E6810AC2A2F4EA7550D072CDE8760197DE4@SAB-FENWICK.sab.uiuc.edu>
References: <B10E6810AC2A2F4EA7550D072CDE8760197DE4@SAB-FENWICK.sab.uiuc.edu>
Campbell, Lance wrote:
> Does the amount of memory allocate to work_mem get subtracted from
> shared_buffers?
>
> Example:
>
> If work_mem is 1M and there are 10 connections and shared_buffers is
> 100M then would the total be 90 M left for shared_buffers?
>
> Or does the amount of memory allocated for work_mem have nothing to do
> with shared_buffers?
No, they're completely separate.
Note that a connection can use more than work_mem of memory. For
example, if you run a query with multiple Sort or hash-nodes, each such
node allocates up to work_mem of memory.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
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: heikki@enterprisedb.com, lance@uiuc.edu
Subject: Re: work_mem and shared_buffers
In-Reply-To: <47349F4E.5070204@enterprisedb.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