General Performance questions

From: "Delao, Darryl W" <ddelao(at)ou(dot)edu>
To: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: General Performance questions
Date: 2003-03-10 15:22:25
Message-ID: FC0CEBD77311DA499A67ADB355A24FA2546B5E@mail4.oulan.ou.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

I have postgres set to a max connection limit of 512. I have nearly 30,000
users that will be taking a training course over the next 6 weeks. I have 3
web servers load balanced serving php content for this website. Last week I
had postgres set to a connection limit of 128 and that was reached. Since
then I have set it to 512 and not had a problem. However, I am unaware of
any good monitoring tools that let me see live connections to the database.
When I run netstat-c on the db server, it lets me see active connection in
real time. Heres an example:


Tcp 0 0 server:postgres 192.168.50.x:port number
ESTABLISHED

I will have anywhere from 5 to 7 of these going at any given time. However
most say TIME_WAIT instead of established.
I am assuming these are connections to the database that php is using to
post and retrieve data. I recently read where postgres uses one semaphore
per connection in sets of 16. With that being said is one of these
connections that I see in netstat-c actually representing 16 connections?
If that is the case, when 6 or 7 are being displayed at once, then that
would mean roughly 112 or so connections, which is great because it doesn't
even come close to my limit of 512. Can anyone confirm that what I am
thinking is right?

Also, is there a way to make the TIME_WAIT status shorter. It seems to
exist for about 25 seconds, then goes away. However, those are connections
that could easily be used.

Thank you,
Darryl



Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-03-10 15:45:26 Re: [NOVICE] General Performance questions
Previous Message Tom Lane 2003-03-10 14:57:57 Re: function param problem in 7.3

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-03-10 15:45:26 Re: [NOVICE] General Performance questions
Previous Message Josh Berkus 2003-03-10 15:07:37 Re: get the oid