Re: Process wakeups when idle and power consumption - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Process wakeups when idle and power consumption
Date
Msg-id BANLkTi=zc29Rz4DyQe=F-przBQMTp8ES-Q@mail.gmail.com
Whole thread Raw
In response to Re: Process wakeups when idle and power consumption  (Peter Geoghegan <peter@2ndquadrant.com>)
Responses Re: Process wakeups when idle and power consumption  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
I've taken a look into it, and I'm not optimistic about the likelihood
of the way I've suggested that we can register a callback on process
termination on windows being acceptable. It seems to be a kludge too
far. It does work on Vista, just not very well. There is a
considerable delay on closing the above console application that uses
this technique, for example, and there seems to be an unpredictable
delay in the callback occurring.

A simpler solution on Windows might be to make the timeout on
auxiliary processes much smaller, but have it increase on each
subsequent timeout (starting from scratch if we wakeup for any reason
other than timeout) until eventually it maxes out at something like
the current value for PGARCH_AUTOWAKE_INTERVAL. If backends are
sleeping for increasing periods of time, the chance of the postmaster
crashing goes down, so denial of service is much less of a concern.

An alternative might be to just not do this on Windows. Certainly,
idle wakeups are likely to be less important on that platform, which
is not a very popular choice for virtual machines deployed on cloudy
infrastructure, the use case that will benefit from these enhancements
the most, by some margin.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: clog_redo causing very long recovery time
Next
From: Yves Weißig
Date:
Subject: Re: could not write block & xlog flush request 3FD/0 is not satisfied