RAM usage per connection

From: Steve Lane <slane(at)moyergroup(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: RAM usage per connection
Date: 2004-05-12 18:39:08
Message-ID: BCC7BD5C.10F5C%slane@moyergroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)moyergroup(dot)com
Fax: (312) 850-3930 Web: http://www.moyergroup.com
=======================================================

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-05-12 19:35:44 Re: Problems dumping database from 7.3.1
Previous Message Gordon Ross 2004-05-12 17:24:09 Re: Problems dumping database from 7.3.1