Re: Performance monitor signal handler

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Performance monitor signal handler
Date: 2001-03-16 20:18:26
Message-ID: 20010316121826.H29888@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [010316 10:06] wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> > Uh - not much time to spend if the statistics should at least
> > be half accurate. And it would become worse in SMP systems.
> > So that was a nifty idea, but I think it'd cause much more
> > statistic losses than I assumed at first.
>
> > Back to drawing board. Maybe a SYS-V message queue can serve?
>
> That would be the same as a pipe: backends would block if the collector
> stopped accepting data. I do like the "auto discard" aspect of this
> UDP-socket approach.
>
> I think Philip had the right idea: each backend should send totals,
> not deltas, in its messages. Then, it doesn't matter (much) if the
> collector loses some messages --- that just means that sometimes it
> has a slightly out-of-date idea about how much work some backends have
> done. It should be easy to design the software so that that just makes
> a small, transient error in the currently displayed statistics.

MSGSND(3) FreeBSD Library Functions Manual MSGSND(3)

ERRORS
msgsnd() will fail if:

[EAGAIN] There was no space for this message either on the
queue, or in the whole system, and IPC_NOWAIT was set
in msgflg.

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-03-16 20:37:45 Re: Performance monitor signal handler
Previous Message Alfred Perlstein 2001-03-16 20:15:58 Re: Re[4]: Allowing WAL fsync to be done via O_SYNC