Re: Help with postgresql memory issue - Mailing list pgsql-general

From Greg Smith
Subject Re: Help with postgresql memory issue
Date
Msg-id alpine.GSO.2.01.0910281738150.18269@westnet.com
Whole thread Raw
In response to Re: Help with postgresql memory issue  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
On Wed, 28 Oct 2009, Greg Stark wrote:

>>   PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
>>  5069 postgres   1  52    0  167M   20M sleep    0:04 13.50% postgres
>
> Hm, well 400 processes if each were taking 190M would be 76G. But that
> doesn't really make much sense since most of the 167M of that process
> is presumably the shared buffers. What is your shared buffers set to
> btw? And your work_mem and maintenance_work_mem?

Pieced together from the upthread config file posts:

shared_buffers = 128MB
work_mem = 16MB
max_connections = 400

So somewhere bewteen 128MB and 167MB of that SIZE is shared_buffers plus
the other usual shared memory suspects.  Let's say each process is using
40MB, which is on the high side.  I'd guess this system might peak at 40MB
* 400 connections+170MB~=16GB of database RAM used, which is so much less
than physical RAM it seems more like a software limit is being run into
instead.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: Help with postgresql memory issue
Next
From: Tom Lane
Date:
Subject: Re: Help with postgresql memory issue