General Performance questions
I have been monitoring netstat -c on my db server for a few days now. I am
trying to determine if when I see a postgres connection, if that is indeed
just 1 connection or if it is a bunch of connections tied up in 1. The
other day I had postgres set to a limit of 128 connections, and that was
reached. But at no time while monitoring netstat -c did I see 128
connections! At this point, im assuming that netstat-c does not provide an
accurate count of current connections. Anyone have any thoughts on this?
Darryl
Netstat -c shows both tcp and unix...at no time did they ever show more than
4 connections when the server reached its limit..
Whats a good way to check ps output?
Darryl
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, March 11, 2003 9:38 AM
To: Delao, Darryl W
Cc: 'pgsql-novice@postgresql.org'; 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] General Performance questions
"Delao, Darryl W" <ddelao@ou.edu> writes:
I have been monitoring netstat -c on my db server for a few days now. I
am
trying to determine if when I see a postgres connection, if that is indeed
just 1 connection or if it is a bunch of connections tied up in 1.
One connection is one connection.
The
other day I had postgres set to a limit of 128 connections, and that was
reached. But at no time while monitoring netstat -c did I see 128
connections!
Are you watching both Unix and TCP sockets? Have you compared netstat
to ps output?
regards, tom lane
Import Notes
Resolved by subject fallback
"Delao, Darryl W" <ddelao@ou.edu> writes:
I have been monitoring netstat -c on my db server for a few days now. I am
trying to determine if when I see a postgres connection, if that is indeed
just 1 connection or if it is a bunch of connections tied up in 1.
One connection is one connection.
The
other day I had postgres set to a limit of 128 connections, and that was
reached. But at no time while monitoring netstat -c did I see 128
connections!
Are you watching both Unix and TCP sockets? Have you compared netstat
to ps output?
regards, tom lane
On Tue, 2003-03-11 at 09:14, Delao, Darryl W wrote:
I have been monitoring netstat -c on my db server for a few days now.
I am trying to determine if when I see a postgres connection, if that
is indeed just 1 connection or if it is a bunch of connections tied up
in 1. The other day I had postgres set to a limit of 128 connections,
and that was reached. But at no time while monitoring netstat -c did
I see 128 connections! At this point, im assuming that netstat-c does
not provide an accurate count of current connections. Anyone have any
thoughts on this?
Is there a reason why you're trying to use netstat rather than the
pg_stat_activity system view?
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/monitoring-stats.html
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
Netstat shows live connections every 2 seconds with -c
-----Original Message-----
From: Neil Conway [mailto:neilc@samurai.com]
Sent: Tuesday, March 11, 2003 11:12 AM
To: Delao, Darryl W
Cc: 'pgsql-novice@postgresql.org'; 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] General Performance questions
On Tue, 2003-03-11 at 09:14, Delao, Darryl W wrote:
I have been monitoring netstat -c on my db server for a few days now.
I am trying to determine if when I see a postgres connection, if that
is indeed just 1 connection or if it is a bunch of connections tied up
in 1. The other day I had postgres set to a limit of 128 connections,
and that was reached. But at no time while monitoring netstat -c did
I see 128 connections! At this point, im assuming that netstat-c does
not provide an accurate count of current connections. Anyone have any
thoughts on this?
Is there a reason why you're trying to use netstat rather than the
pg_stat_activity system view?
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/monitoring-stats
.html
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
Import Notes
Resolved by subject fallback
I've been having problems with DB Visualizer (dbvis) since installing
Java 1.4.1 on my Mac OS X 10.2.4 running PostgreSQL 7.3. Previously
there was no problem AT ALL with dbvis; now, specifically, it seems to
drop or lose track of my connection.
Has anyone else noticed a problem? Is there something I'm overlooking?
When the old Java was there, there was never a glitch.
--
David C. Oshel mailto:dcoshel@inav.net
Cedar Rapids, Iowa http://soli.inav.net/~dcoshel
``Raffiniert ist der Herrgot, aber boshaft ist er nicht." - A. Einstein
On many boxes, something like:
ps ax |grep postgres
will do.
On Tue, 11 Mar 2003, Delao, Darryl W wrote:
Show quoted text
Netstat -c shows both tcp and unix...at no time did they ever show more than
4 connections when the server reached its limit..Whats a good way to check ps output?
Darryl
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, March 11, 2003 9:38 AM
To: Delao, Darryl W
Cc: 'pgsql-novice@postgresql.org'; 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] General Performance questions"Delao, Darryl W" <ddelao@ou.edu> writes:
I have been monitoring netstat -c on my db server for a few days now. I
am
trying to determine if when I see a postgres connection, if that is indeed
just 1 connection or if it is a bunch of connections tied up in 1.One connection is one connection.
The
other day I had postgres set to a limit of 128 connections, and that was
reached. But at no time while monitoring netstat -c did I see 128
connections!Are you watching both Unix and TCP sockets? Have you compared netstat
to ps output?regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
On Tue, 11 Mar 2003, Delao, Darryl W wrote:
I have been monitoring netstat -c on my db server for a few days now. I am
trying to determine if when I see a postgres connection, if that is indeed
just 1 connection or if it is a bunch of connections tied up in 1. The
other day I had postgres set to a limit of 128 connections, and that was
reached. But at no time while monitoring netstat -c did I see 128
connections! At this point, im assuming that netstat-c does not provide an
accurate count of current connections. Anyone have any thoughts on this?
something on your machine is horribly wrong. You should, on an unloaded
box, be able to open at least 100 connections a second. 1,000 or more is
common.
What OS etc... are you running? What does free, top, or ps ax|grep post
show during this process? Are you running out of swap or free memory or
something like that? Is there a lot of disk access when you connect
(iostat -x)???