From: | "Rady, Doug" <radydoug(at)amazon(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | PATCH: pgbench - option to build using ppoll() for larger connection counts |
Date: | 2018-01-22 08:34:06 |
Message-ID: | 23D017C9-81B7-484D-8490-FD94DEC4DF59@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This version of the patch attempts to address the feedback for the previous
submission on 28-Nov-2017
This patch enables building pgbench to use ppoll() instead of select()
to allow for more than (FD_SETSIZE - 10) connections. As implemented,
when using ppoll(), the only connection limitation is system resources.
“… ppoll() is to poll() as pselect() is to select(). Since the
existing code uses select(), why not convert to poll() rather than
ppoll()?”
Time in pgbench is measured in microseconds.
The select() uses microseconds.
The ppoll() and pselect() call use nanoseconds
The poll() call uses milliseconds.
In order to not downgrade time resolution, ppoll() is used instead of poll().
Without this patch, one is limited to '(FD_SETSIZE - 10)’ number of connections.
Example of something that fails without this patch but works with the patch:
Without the patch:
$ pgbench -j 1500 -c 1500
invalid number of clients: "1500"
With the patch:
$ pgbench -j 1500 -c 1500
starting vacuum...end.
progress: 12.0 s, 782.3 tps, lat 917.507 ms stddev 846.929
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 2000
query mode: simple
number of clients: 1500
number of threads: 1500
number of transactions per client: 10
number of transactions actually processed: 15000/15000
latency average = 1180.216 ms
latency stddev = 855.126 ms
tps = 658.674816 (including connections establishing)
tps = 765.289160 (excluding connections establishing)
--
Doug Rady
Amazon Aurora, RDS PostgreSQL
radydoug(at)amazon(dot)com
Attachment | Content-Type | Size |
---|---|---|
pgbench11-ppoll-v6.patch | application/octet-stream | 10.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2018-01-22 09:16:30 | Re: [HACKERS] Supporting huge pages on Windows |
Previous Message | Masahiko Sawada | 2018-01-22 08:14:29 | Re: PATCH: Exclude unlogged tables from base backups |