Re: Listen / Notify rewrite - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Listen / Notify rewrite
Date
Msg-id b42b73150911141406k6142bf26tc0ece5dc8b566dab@mail.gmail.com
Whole thread Raw
In response to Re: Listen / Notify rewrite  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Listen / Notify rewrite
List pgsql-hackers
On Fri, Nov 13, 2009 at 11:08 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
 (By the way, has anyone yet tried to
> compare the speed of this implementation to the old code?)

I quickly hacked pgbench to take a custom script on connection (for
listen), and make pgbench'd 'notify x'; with all clients doing 'listen
x'.

The old method (measured on a 4 core high performance server) has
severe scaling issues due to table bloat (we knew that):
./pgbench -c 10 -t 1000 -n -b listen.sql -f notify.sql
run #1 tps = 1364.948079 (including connections establishing)
run #2 tps = 573.988495 (including connections establishing)
<vac full pg_listener>
./pgbench -c 50 -t 200 -n -b listen.sql -f notify.sql
tps = 844.033498 (including connections establishing)


new method on my dual core workstation (max payload 128):
./pgbench -c 10 -t 10000 -n -b listen.sql -f notify.sql -hlocalhost postgres
tps = 16343.012373 (including connections establishing)
./pgbench -c 20 -t 5000 -n -b listen.sql -f notify.sql -hlocalhost postgres
tps = 7642.104941 (including connections establishing)
./pgbench -c 50 -t 5000 -n -b listen.sql -f notify.sql -hlocalhost postgres
tps = 3184.049268 (including connections establishing)

max payload 2048:
./pgbench -c 10 -t 10000 -n -b listen.sql -f notify.sql -hlocalhost postgres
tps = 12062.906610 (including connections establishing)
./pgbench -c 20 -t 5000 -n -b listen.sql -f notify.sql -hlocalhost postgres
tps = 7229.505869 (including connections establishing)
./pgbench -c 50 -t 5000 -n -b listen.sql -f notify.sql -hlocalhost postgres
tps = 3219.511372 (including connections establishing)

getting sporadic 'LOG:  could not send data to client: Broken pipe'
throughout the test.

merlin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: patch - per-tablespace random_page_cost/seq_page_cost
Next
From: Tom Lane
Date:
Subject: Re: New VACUUM FULL