pgbouncer - pgbouncer: New tunable 'sbuf_loopcnt' to limit time spent on - Mailing list pgsql-committers

From mkz@pgfoundry.org (User Mkz)
Subject pgbouncer - pgbouncer: New tunable 'sbuf_loopcnt' to limit time spent on
Date
Msg-id 20081119120637.6238C17ADE0B@pgfoundry.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
New tunable 'sbuf_loopcnt' to limit time spent on one socket.

In some situations - eg SMP server, local Postgres and fast network -
pgbouncer can run recv()->send() loop many times without blocking
on either side.  But that means other connections will stall for
a long time.  To make processing more fair, limit the times
of doing recv()->send() one socket.  If count reaches limit,
just proceed processing other sockets.  The processing for
that socket will resume on next event loop.

Thanks to Alexander Schöcke for report and testing.

Modified Files:
--------------
    pgbouncer/doc:
        config.txt (r1.15 -> r1.16)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgbouncer/pgbouncer/doc/config.txt.diff?r1=1.15&r2=1.16)
    pgbouncer/include:
        bouncer.h (r1.19 -> r1.20)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgbouncer/pgbouncer/include/bouncer.h.diff?r1=1.19&r2=1.20)
    pgbouncer/src:
        main.c (r1.49 -> r1.50)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgbouncer/pgbouncer/src/main.c.diff?r1=1.49&r2=1.50)
        sbuf.c (r1.32 -> r1.33)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgbouncer/pgbouncer/src/sbuf.c.diff?r1=1.32&r2=1.33)

pgsql-committers by date:

Previous
From: mkz@pgfoundry.org (User Mkz)
Date:
Subject: pgbouncer - pgbouncer: debug: log connection endpoints
Next
From: mkz@pgfoundry.org (User Mkz)
Date:
Subject: pgbouncer - pgbouncer: add milliseconds to log timestamps