Re: Workqueue performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jason Armstrong <ja(at)riverdrums(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Workqueue performance
Date: 2010-05-11 14:13:27
Message-ID: 5810.1273587207@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jason Armstrong <ja(at)riverdrums(dot)com> writes:
> My worker processes then 'LISTEN' for the appropriate NOTIFY, select
> the rows from the fileworkqueue.job table according to the
> 'filetype_id', and transfer them. After processing, it deletes the row
> from the workqueue.

> When we are processing without the workers running (ie just insert
> into the log.file table, with the fileworkqueue.job table being filled
> up by the trigger), we see a rate of about 3 milliseconds per insert.
> When it is run with the workers removing data from the
> fileworkqueue.job table, this drops to below 50 Ms.

Not sure if this is the source of your issue, but have you checked how
many dead rows are in pg_listener? Applications that are making heavy
use of NOTIFY/LISTEN tend to need *very* aggressive vacuuming of that
table in order to keep performance up.

(FWIW, 9.0 will have a rewritten notify mechanism that eliminates this
problem. Doesn't help you today though.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-05-11 14:16:47 Re: can function arguments have the type tablename.columnname%TYPE?
Previous Message Simon Riggs 2010-05-11 14:10:05 Re: List traffic