Re: cost delay brainstorming

2024-06-25 Thread Andy Fan
Andy Fan writes: > >> - Longrunning transaction prevents increasing relfrozenxid, we run autovacuum >> over and over on the same relation, using up the whole cost budget. This is >> particularly bad because often we'll not autovacuum anything else, building >> up a larger and larger

Re: cost delay brainstorming

2024-06-21 Thread Andy Fan
Hi, > Hi, > > On 2024-06-17 15:39:27 -0400, Robert Haas wrote: >> As I mentioned in my talk at 2024.pgconf.dev, I think that the biggest >> problem with autovacuum as it exists today is that the cost delay is >> sometimes too low to keep up with the amount of vacuuming that needs >> to be done.

Re: cost delay brainstorming

2024-06-18 Thread Nathan Bossart
On Tue, Jun 18, 2024 at 01:32:38PM -0700, Andres Freund wrote: > On 2024-06-18 13:50:46 -0500, Nathan Bossart wrote: >> Have we ruled out further adjustments to the cost parameters as a first >> step? > > I'm not against that, but I it doesn't address the issue that with the current > logic one

Re: cost delay brainstorming

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 13:50:46 -0500, Nathan Bossart wrote: > Have we ruled out further adjustments to the cost parameters as a first > step? I'm not against that, but I it doesn't address the issue that with the current logic one set of values just isn't going to fit a 60MB that's allowed to burst

Re: cost delay brainstorming

2024-06-18 Thread Nathan Bossart
On Mon, Jun 17, 2024 at 03:39:27PM -0400, Robert Haas wrote: > I think we might able to get fairly far by observing that if the > number of running autovacuum workers is equal to the maximum allowable > number of running autovacuum workers, that may be a sign of trouble, > and the longer that

Re: cost delay brainstorming

2024-06-17 Thread David Rowley
On Tue, 18 Jun 2024 at 07:39, Robert Haas wrote: > I think we might able to get fairly far by observing that if the > number of running autovacuum workers is equal to the maximum allowable > number of running autovacuum workers, that may be a sign of trouble, > and the longer that situation

Re: cost delay brainstorming

2024-06-17 Thread Greg Sabino Mullane
On Mon, Jun 17, 2024 at 3:39 PM Robert Haas wrote: > So, a very simple algorithm would be: If the maximum number of workers > have been running continuously for more than, say, > 10 minutes, assume we're falling behind Hmm, I don't know about the validity of this. I've seen plenty of cases

Re: cost delay brainstorming

2024-06-17 Thread Andres Freund
Hi, On 2024-06-17 15:39:27 -0400, Robert Haas wrote: > As I mentioned in my talk at 2024.pgconf.dev, I think that the biggest > problem with autovacuum as it exists today is that the cost delay is > sometimes too low to keep up with the amount of vacuuming that needs > to be done. I agree it's a

cost delay brainstorming

2024-06-17 Thread Robert Haas
Hi, As I mentioned in my talk at 2024.pgconf.dev, I think that the biggest problem with autovacuum as it exists today is that the cost delay is sometimes too low to keep up with the amount of vacuuming that needs to be done. I sketched a solution during the talk, but it was very complicated, so I