Re: Configure autovacuum - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Configure autovacuum
Date
Msg-id 3f683e09-d229-42dd-b299-986d61c201aa@aklaver.com
Whole thread Raw
In response to RE: Configure autovacuum  ("Shenavai, Manuel" <manuel.shenavai@sap.com>)
Responses RE: Configure autovacuum
List pgsql-general
On 7/4/24 08:16, Shenavai, Manuel wrote:
> We see that our DB keeps increasing under high load (many updates). We see that our DB has a size of 200GB and we got
199GBbloat, 0 dead tuple. And when the DB is put on high load (many updates), we still see that the DB size grows. We
tryto find parameters to avoid DB growth.
 

Show your work:

1) How did you determine the bloat number?

2) How did you determine there are 0 dead tuples?

3) Define high load.

4) Postgres version?

5) What are your autovacuum settings?


> 
> I think we need to tweak the autovacuum settings and maybe limit the volume of data that can be written to the DB.

That will need to happen on client end.

> 
> Is there any setting in postgres that would allow to write only certain volume? For example, limit the amount of data
thatcan be written to a table to 100MB/minute.
 
> 
> Best regards,
> Manuel
> 
> -----Original Message-----
> From: Adrian Klaver <adrian.klaver@aklaver.com>
> Sent: 14 June 2024 16:32
> To: Shenavai, Manuel <manuel.shenavai@sap.com>; pgsql-general <pgsql-general@postgresql.org>
> Subject: Re: Configure autovacuum
> 
> On 6/13/24 23:20, Shenavai, Manuel wrote:
>> Hi everyone,
>>
>> I would like to configure the autovacuum in a way that it runs very
>> frequently (i.e. after each update-statement). I tried the following
> 
> Why?
> 
> What is the problem you are trying to solve?
> 
>> settings on my table:
>>
>> alter table mytable set (autovacuum_vacuum_scale_factor  = 0.0);
>>
>> alter table mytable set (autovacuum_vacuum_cost_delay  = 0.0);
>>
>> alter table mytable set (autovacuum_vacuum_cost_limit  = 10000);
>>
>> alter table mytable set (autovacuum_vacuum_threshold  = 1);
>>
>> I do a lot of updates on a single tuple and I would expect that the
>> autovacuum would start basically after each update (due to
>> autovacuum_vacuum_threshold=1). But the autovacuum is not running.
>>
>> Is it possible to configure postgres to autovacuum very aggressively
>> (i.e. after each update-statement)?
>>
>> Thanks in advance &
>>
>> Best regards,
>>
>> Manuel
>>
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: "Shenavai, Manuel"
Date:
Subject: RE: Configure autovacuum
Next
From: "Shenavai, Manuel"
Date:
Subject: RE: Configure autovacuum