[pgpool-committers: 2712] pgpool: Add new parameter "serialize_accept".

Tatsuo Ishii ishii at postgresql.org
Sun Oct 4 23:35:53 JST 2015


Add new parameter "serialize_accept".

This parameter defines whether to serialize accept() call for incoming
client connections.  Default is off, which means no serializing (same
behavior as pgpool-II 3.4 or before).  If this is off, the kernel
wakes up all of pgpool-II child process to execute accept() and one of
them actually accepts the incoming connection.  Problem here is,
because so my child process wake up at a same time, heavy context
switching occurred and the performance is affected.  This phenomena is
a classic problem called "the thundering herd problem".  By enabling
serialize_accept, only one of pgpool-II child process is woken up and
executes accept() and the problem can be avoided.

If child_life_time is enabled, serialize_accept has no effect.  If you
are care about pgpool-II process memory leak or whatever potential
issue, you could use child_max_connections instead.  This is purely an
implementation limitation and maybe we could eliminate it in the
future.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f363b1acbfe1ee4867995ff72cc81bb09cf66767

Modified Files
--------------
doc/pgpool-en.html                         |   40 ++++++++++++++++++++++++++
doc/pgpool-ja.html                         |   42 ++++++++++++++++++++++++++++
src/config/pool_config.c                   |   15 ++++++++++
src/config/pool_config.l                   |   15 ++++++++++
src/include/pool.h                         |    3 +-
src/include/pool_config.h                  |    1 +
src/protocol/child.c                       |   19 +++++++++++++
src/sample/pgpool.conf.sample              |    3 ++
src/sample/pgpool.conf.sample-master-slave |    3 ++
src/sample/pgpool.conf.sample-replication  |    3 ++
src/sample/pgpool.conf.sample-stream       |    3 ++
src/utils/pool_process_reporting.c         |    5 ++++
12 files changed, 151 insertions(+), 1 deletion(-)



More information about the pgpool-committers mailing list