Re: perform_spin_delay() vs wait events

2022-11-21 Thread Andres Freund
Hi, On 2022-11-22 12:51:25 +0900, Michael Paquier wrote: > On Mon, Nov 21, 2022 at 07:01:18PM -0800, Andres Freund wrote: > > I plan to push this soon unless somebody has further comments. > > > @@ -146,7 +146,8 @@ typedef enum > > WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL, > >

Re: perform_spin_delay() vs wait events

2022-11-21 Thread Michael Paquier
On Mon, Nov 21, 2022 at 07:01:18PM -0800, Andres Freund wrote: > I plan to push this soon unless somebody has further comments. > @@ -146,7 +146,8 @@ typedef enum > WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL, > WAIT_EVENT_REGISTER_SYNC_REQUEST, > WAIT_EVENT_VACUUM_DELAY, > -

Re: perform_spin_delay() vs wait events

2022-11-21 Thread Andres Freund
Hi, On 2022-11-22 00:03:23 +0300, Alexander Korotkov wrote: > On Tue, Nov 22, 2022 at 12:01 AM Andres Freund wrote: > > On November 21, 2022 12:58:16 PM PST, Alexander Korotkov > > wrote: > > >On Mon, Nov 21, 2022 at 2:10 AM Andres Freund wrote: > > >+1 for making a group of individual names

Re: perform_spin_delay() vs wait events

2022-11-21 Thread Alexander Korotkov
On Tue, Nov 22, 2022 at 12:01 AM Andres Freund wrote: > On November 21, 2022 12:58:16 PM PST, Alexander Korotkov > wrote: > >On Mon, Nov 21, 2022 at 2:10 AM Andres Freund wrote: > >> On 2022-11-20 17:26:11 -0500, Robert Haas wrote: > >> > On Sun, Nov 20, 2022 at 3:43 PM Andres Freund wrote: >

Re: perform_spin_delay() vs wait events

2022-11-21 Thread Andres Freund
Hi, On November 21, 2022 12:58:16 PM PST, Alexander Korotkov wrote: >On Mon, Nov 21, 2022 at 2:10 AM Andres Freund wrote: >> On 2022-11-20 17:26:11 -0500, Robert Haas wrote: >> > On Sun, Nov 20, 2022 at 3:43 PM Andres Freund wrote: >> > > I couldn't quite decide what wait_event_type to best

Re: perform_spin_delay() vs wait events

2022-11-21 Thread Alexander Korotkov
On Mon, Nov 21, 2022 at 2:10 AM Andres Freund wrote: > On 2022-11-20 17:26:11 -0500, Robert Haas wrote: > > On Sun, Nov 20, 2022 at 3:43 PM Andres Freund wrote: > > > I couldn't quite decide what wait_event_type to best group this under? In > > > the > > > attached patch I put it under

Re: perform_spin_delay() vs wait events

2022-11-21 Thread Robert Haas
On Sun, Nov 20, 2022 at 6:10 PM Andres Freund wrote: > I was wondering about that too - but decided against it because it would only > show a single wait event. And wouldn't really describe spinlocks as a whole, > just the "extreme" delays. If we wanted to report the spin waits more > granular,

Re: perform_spin_delay() vs wait events

2022-11-20 Thread Andres Freund
Hi, On 2022-11-20 17:26:11 -0500, Robert Haas wrote: > On Sun, Nov 20, 2022 at 3:43 PM Andres Freund wrote: > > I couldn't quite decide what wait_event_type to best group this under? In > > the > > attached patch I put it under timeouts, which doesn't seem awful. > > I think it would be best

Re: perform_spin_delay() vs wait events

2022-11-20 Thread Robert Haas
On Sun, Nov 20, 2022 at 3:43 PM Andres Freund wrote: > The lwlock wait queue scalability issue [1] was quite hard to find because of > the exponential backoff and because we adjust spins_per_delay over time within > a backend. > > I think the least we could do to make this easier would be to

perform_spin_delay() vs wait events

2022-11-20 Thread Andres Freund
Hi, The lwlock wait queue scalability issue [1] was quite hard to find because of the exponential backoff and because we adjust spins_per_delay over time within a backend. I think the least we could do to make this easier would be to signal spin delays as wait events. We surely don't want to do