Re: resowner "cold start" overhead - Mailing list pgsql-hackers

From Andres Freund
Subject Re: resowner "cold start" overhead
Date
Msg-id 20221101001625.ardg5eman7oiogq2@awork3.anarazel.de
Whole thread Raw
In response to Re: resowner "cold start" overhead  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
Hi,

On 2022-10-31 11:05:32 +0100, Heikki Linnakangas wrote:
> What do you think of my ResourceOwner refactoring patches [1]? Reminded by
> this, I rebased and added it to the upcoming commitfest again.

> With that patch, all resources are stored in the same array and hash. The
> array is part of ResourceOwnerData, so it saves the allocation overhead,
> like the "initialarr" that you suggested. And it always uses the array for
> recently remembered resources, and spills over to the hash for more
> long-lived resources.
> 
> Andres, could you repeat your benchmark with [1], to see if it helps?
>
> [1] https://www.postgresql.org/message-id/2e10b71b-352e-b97b-1e47-658e2669cecb@iki.fi

Just for future readers of this thread: Replied on the other thread.

It does seem to address the performance issue, but I have some architectural
concerns.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: ResourceOwner refactoring
Next
From: Zhihong Yu
Date:
Subject: Re: heavily contended lwlocks with long wait queues scale badly