pgsql: Reduce idle power consumption of stats collector process.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reduce idle power consumption of stats collector process.
Date: 2012-05-09 01:27:01
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Reduce idle power consumption of stats collector process.

Latch-ify the stats collector, so that it does not need an arbitrary wakeup
cycle to check for postmaster death. The incremental savings in idle power
is pretty marginal, since we only had it waking every two seconds; but I
believe that this patch may also improve the collector's performance under
load, by reducing the number of kernel calls made per message when messages
are arriving constantly (we now avoid a select/poll call except when we
need to sleep). The change also reduces the time needed for a normal
database shutdown on platforms where signals don't interrupt select().

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/49340037ee3ab46cb24144a86705e35f272c24d5

Modified Files
--------------
src/backend/postmaster/pgstat.c | 181 ++++++++++++++-------------------------
1 files changed, 65 insertions(+), 116 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2012-05-09 02:51:35 pgsql: Document how to find non-ASCII characters in the release notes.
Previous Message Tom Lane 2012-05-09 00:03:55 pgsql: Reduce idle power consumption of walwriter and checkpointer proc