Re: Reducing power consumption on idle servers

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Zheng Li <zhengli10(at)gmail(dot)com>, Jim Nasby <nasbyj(at)amazon(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing power consumption on idle servers
Date: 2022-11-20 20:00:45
Message-ID: CANbhV-EcDKNG6bAah97iEhPXsUnphW5_xLXyPd1mK_gBXungyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 24 Mar 2022 at 16:21, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Thu, Mar 24, 2022 at 12:02 PM Simon Riggs

> > What changes will be acceptable for bgwriter, walwriter and logical worker?
>
> Hmm, I think it would be fine to introduce some kind of hibernation
> mechanism for logical workers. bgwriter and wal writer already have a
> hibernation mechanism, so I'm not sure what your concern is there
> exactly. In your initial email you said you weren't proposing changes
> there, but maybe that changed somewhere in the course of the
> subsequent discussion. If you could catch me up on your present
> thinking that would be helpful.

Now that we seem to have solved the problem for Startup process, let's
circle back to the others....

Bgwriter does hibernate currently, but only at 50x the bgwriter_delay.
At default values that is 5s, but could be much less. So we need to
move that up to 60s, same as others.

WALwriter also hibernates currently, but only at 25x the
wal_writer_delay. At default values that is 2.5s, but could be much
less. So we need to move that up to 60s, same as others. At the same
time, make sure that when we hibernate we use a new WaitEvent,
similarly to the way bgwriter reports its hibernation state (which
also helps test the patch).

As a 3rd patch, I will work on making logical workers hibernate.

--
Simon Riggs http://www.EnterpriseDB.com/

Attachment Content-Type Size
hibernate_bgwriter_walwriter.v5.patch application/octet-stream 3.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-11-20 20:37:26 Unstable regression test for contrib/pageinspect
Previous Message Peter Geoghegan 2022-11-20 19:58:12 Re: HOT chain validation in verify_heapam()