Re: How is memory allocated/used by Postgresql Database connections - Mailing list pgsql-performance

From Jeff Janes
Subject Re: How is memory allocated/used by Postgresql Database connections
Date
Msg-id CAMkU=1yzzrtSWvV=1cwLbAYGBc5xNXHEMB+Sx0BGtAdme=ix8w@mail.gmail.com
Whole thread Raw
In response to How is memory allocated/used by Postgresql Database connections  ("McKinzie, Alan (Alan)" <alanmck@avaya.com>)
List pgsql-performance
On Thu, Jul 25, 2013 at 6:23 AM, McKinzie, Alan (Alan)
<alanmck@avaya.com> wrote:

> FYI – I am using smem (on a linux server) to monitor the memory allocated to
> our Database connections.  In an attempt to lower our memory footprint, I
> lowered our setting for work_mem from 1MB down to 500kB (in addition I
> enabled log_temp_files to see the SQL statements that now use temp files for
> sorting and hash operations).

1MB is already pretty small.  If you have a lot of connections all
using temp space at the same time, you should probably consider using
a connection pooler to limit that number and then increasing work_mem,
rather than decreasing it.

Cheers,

Jeff


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: How is memory allocated/used by Postgresql Database connections
Next
From: Kevin Grittner
Date:
Subject: Re: FTS performance issue - planner problem identified (but only partially resolved)