Skip site navigation (1) Skip section navigation (2)

Re: LISTEN / NOTIFY performance in 8.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joel Stevenson <joelstevenson(at)mac(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: LISTEN / NOTIFY performance in 8.3
Date: 2008-02-26 17:43:26
Message-ID: 5080.1204047806@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Joel Stevenson <joelstevenson(at)mac(dot)com> writes:
> Now that I see a little bit more of what goes on under the hood of 
> this function I see that it's still basically table-driven and I'll 
> adjust my expectations accordingly,

Yeah, there's been discussion of replacing the implementation with some
all-in-memory queue kind of setup, but no one's got round to that yet.

> With ps I can see some postgres backends with a 'notify interrupt 
> waiting' command line during the tests - could it be an issue with 
> signal handling on the original machine - something entirely outside 
> of PG's control?

No, that's not unexpected if you have the same notify being delivered to
multiple processes that had been idle.  They'll all get wakened and try
to read pg_listener to see what happened, but since this is a
read-modify-write type of operation it uses an exclusive lock, so only
one can clear its pg_listener entry at a time.  The 'waiting' ones you
are seeing are stacked up behind whichever one has the lock at the
moment.  They shouldn't be waiting for long.

I'm still baffled by why we aren't seeing comparable performance for the
same test case.  What I'm testing on is couple-year-old desktop kit
(dual 2.8GHz Xeon, consumer-grade disk drive) --- I had assumed your
server would be at least as fast as that, but maybe not?

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2008-02-26 17:59:39
Subject: Re: PG planning randomly ?
Previous:From: Laurent RaufasteDate: 2008-02-26 17:12:07
Subject: Re: PG planning randomly ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group