From: Steve Lane <slane@moyergroup.com>
To: pgsql-admin@postgresql.org
Subject: RAM usage per connection
Date: Wed, 12 May 2004 11:39:08 -0700
Message-ID: <BCC7BD5C.10F5C%slane@moyergroup.com> (raw)
In-Reply-To: <20040510122217.D1DF958005D0@mwinf0401.wanadoo.fr>
Hello all:
I have a customer with an application in production (postgres + php +
apache) where we began seeing a number of scary messages in the logs. (It's
postgres 7.2.1, by the way).
Generally the messages seem to point to resource starvation of some kind:
FATAL 1: out of free buffers: time to abort !
And
Sorry, too many clients already
Also some messages indicating shared memory had been corrupted. I shut down
and ran ipcclean and those messages are gone. I also boosted shared-buffers
considerably and the "out of free buffers" message is also gone.
BUT, the "sorry too many clients" message persists. The app has a spike-y
usage pattern, i.e. A large number of students sits down at once and takes a
survey in accordance with verabl instructions from the front of the
classroom, so many of them are hitting the proverbial Submit button at once.
I tried increasing max_clients, but got a message to the effect that SHMMIN
was set incorrectly on my machine ...
Let me get to my actual question (none of the above contains the question
yet :->).
Is there any guideline as to how much free RAM I need per client connection?
I think I understand that things like sort_mem play into this -- that's set
low and should remain so. But for Apache, for example, I think of 10 meg per
connection. Any similar rule of thumb for postgres?
I'll follow up as I inspect the logs, but I haven't thoroughly sifted them.
So for my now my question is the one about RAM per connection. Any
thoughts'd be much appreciated.
-- sgl
=======================================================
Steve Lane
Vice President
The Moyer Group
14 North Peoria St Suite 2H
Chicago, IL 60607
Voice: (312) 433-2421 Email: slane@moyergroup.com
Fax: (312) 850-3930 Web: http://www.moyergroup.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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: slane@moyergroup.com
Subject: Re: RAM usage per connection
In-Reply-To: <BCC7BD5C.10F5C%slane@moyergroup.com>
References: <20040510122217.D1DF958005D0@mwinf0401.wanadoo.fr> <BCC7BD5C.10F5C%slane@moyergroup.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