Re: Reducing power consumption on idle servers - Mailing list pgsql-hackers

From Zheng Li
Subject Re: Reducing power consumption on idle servers
Date
Msg-id CAAD30ULHfDF1j1J_5nXaOHUeV6OPJR48tJoNxbfbSoJOq507Lg@mail.gmail.com
Whole thread Raw
In response to Re: Reducing power consumption on idle servers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Reducing power consumption on idle servers  (Simon Riggs <simon.riggs@enterprisedb.com>)
List pgsql-hackers
Hi,

> Replication never got the memo, so power consumption on an
> idle server is not very effective on standby or logical subscribers.
> The code and timing for hibernation is also different for each worker,
> which is confusing.

Agree, this patch makes it easier to understand the hibernation
behavior of various workers.

> 1. Standardize the hibernation time at 60s, using a #define
> HIBERNATE_DELAY_SEC 60

I notice in patch 3 HIBERNATE_DELAY_SEC has been increased to 300
seconds, what’s the reasoning behind it? Is longer hibernation delay
better? If so can we set it to INT_MAX (the max timeout allowed by
WaitLatch()) in which case a worker in hibernation only relies on
wakeup? I think it would be nice to run experiments to verify that the
patch reduces power consumption while varying the value of
HIBERNATE_DELAY_SEC.

Regards,
Zheng Li
Amazon RDS/Aurora for PostgreSQL



On Thu, Mar 3, 2022 at 5:49 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Jim Nasby <nasbyj@amazon.com> writes:
> > I'm wondering if it'd be worth linking autovac wakeup from a truly idle
> > state to the stats collector. If there's no stats messages coming in
> > clearly there's nothing new for autovac.
>
> That seems pretty scary in the current system design, where the
> stats collector is intentionally not 100% reliable (and sometimes,
> less intentionally, it fails completely).  If we get to a place
> where we're willing to bank on stats being collected 100% of the
> time, it might make sense.
>
>                         regards, tom lane
>
>



pgsql-hackers by date:

Previous
From: "Hsu, John"
Date:
Subject: Re: Allow async standbys wait for sync replication
Next
From: Chapman Flack
Date:
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file