Re: Performance monitor signal handler

From: Jan Wieck <janwieck(at)Yahoo(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alfred Perlstein <bright(at)wintelcom(dot)net>, Philip Warner <pjw(at)rhyme(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Performance monitor signal handler
Date: 2001-03-15 11:57:49
Message-ID: 200103151157.GAA02523@jupiter.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
>
> Yes, it seems storing info in shared memory and having a system table to
> access it is the way to go.

Depends,

first of all we need to know WHAT we want to collect. If we
talk about block read/write statistics and such on a per
table base, which is IMHO the most accurate thing for tuning
purposes, then we're talking about an infinite size of shared
memory perhaps.

And shared memory has all the interlocking problems we want
to avoid.

What about a collector deamon, fired up by the postmaster and
receiving UDP packets from the backends. Under heavy load, it
might miss some statistic messages, well, but that's not as
bad as having locks causing backends to loose performance.

The postmaster could already provide the UDP socket for the
backends, so the collector can know the peer address from
which to accept statistics messages only. Any message from
another peer address is simply ignored. For getting the
statistics out of it, the collector has his own server
socket, using TCP and providing some lookup protocol.

Now whatever the backend has to tell the collector, it simply
throws a UDP packet into his direction. If the collector can
catch it or not, not the backends problem.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2001-03-15 12:53:17 Re: PostgreSQL on multi-CPU systems
Previous Message Joel Quinet 2001-03-15 11:18:39 Problem build python extension on Unixware