Re: Proposed fix for NOTIFY performance degradation

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposed fix for NOTIFY performance degradation
Date: 2011-04-24 22:59:17
Message-ID: BANLkTinnR5OQq8_MkD+7MkCn04qQSRv+XQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 23, 2011 at 2:57 PM, Gianni Ciolli
<gianni(dot)ciolli(at)2ndquadrant(dot)it> wrote:

> * "avg_usec" denotes the average time in microseconds required by each
>  NOTIFY statement.
>
> h2. Test 1 - PostgreSQL HEAD
>
>   n   |   m   | iter | avg_usec
> -------+-------+------+----------
>    10 |     1 |   10 |   43.730
>   100 |     1 |   10 |   37.630
>  1000 |     1 |   10 |   42.990
>  10000 |     1 |   10 |   36.225
>    10 |    10 |   10 |   43.960
>   100 |   100 |   10 |   46.537
>  1000 |  1000 |   10 |  126.115
>  10000 | 10000 |   10 |  906.501

I read that wrong first time around. So the wasted time from duplicate checks is

n | m | iter | msec
-------+-------+------+----------
10 | 10 | 10 | 0
100 | 100 | 10 | 0.3
1000 | 1000 | 10 | 80
10000 | 10000 | 10 | 8600

So the cost of the duplicate checks only kicks in at about 200 notifies.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-04-24 23:06:34 Re: Proposed fix for NOTIFY performance degradation
Previous Message Christopher Browne 2011-04-24 22:31:55 Re: Unlogged tables, persistent kind