From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Alexy Khrabrov <deliverable@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: two memory-consuming postgres processes
Date: Fri, 02 May 2008 16:13:37 -0400
Message-ID: <21403.1209759217@sss.pgh.pa.us> (raw)
In-Reply-To: <dcc563d10805021253n1589baa7u559fdfc8053d23d3@mail.gmail.com>
References: <A728C858-76CF-473F-917B-3C9EA4AA75CF@gmail.com>
<dcc563d10805021230i5916561k3962a41e2afa894c@mail.gmail.com>
<27A4D379-2553-496D-A96C-102F2A5E62C2@gmail.com>
<dcc563d10805021253n1589baa7u559fdfc8053d23d3@mail.gmail.com>
"Scott Marlowe" <scott.marlowe@gmail.com> writes:
> On Fri, May 2, 2008 at 1:38 PM, Alexy Khrabrov <deliverable@gmail.com> wrote:
>> I randomly increased values in postgresql.conf to
>>
>> shared_buffers = 1500MB
>> max_fsm_pages = 2000000
>> max_fsm_relations = 10000
> On a laptop with 2G ram, 1.5Gig shared buffers is probably WAY too high.
s/probably/definitely/, especially seeing that OS X is a bit of a memory
hog itself. I don't think you should figure on more than 1GB being
usefully available to Postgres, and you can't give all or even most of
that space to shared_buffers.
> No, the background writer reads through the shared buffers for dirty
> ones and writes them out. so, it's not really using MORE memory, it's
> just showing that it's attached to the ginormous shared_buffer pool
> you've set up.
Yeah. You have to be aware of top's quirky behavior for shared memory:
on most platforms it will count the shared memory against *each*
process, but only as much of the shared memory as that process has
touched so far. So over time the reported size of any PG process will
tend to climb to something over the shared memory size, but most of that
isn't "real".
I haven't directly checked whether OS X's top behaves that way, but
given your report I think it does.
regards, tom lane
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: tgl@sss.pgh.pa.us, scott.marlowe@gmail.com, deliverable@gmail.com
Subject: Re: two memory-consuming postgres processes
In-Reply-To: <21403.1209759217@sss.pgh.pa.us>
* 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