Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants. - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.
Date
Msg-id 8f67073e5a6818a17eef5c44b087640db8939f7d.camel@cybertec.at
Whole thread Raw
In response to Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.  (Avinash Kumar <avinash.vallarapu@gmail.com>)
Responses Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.  (Avinash Kumar <avinash.vallarapu@gmail.com>)
List pgsql-performance
On Fri, 2020-05-08 at 03:47 -0300, Avinash Kumar wrote:
> > Just set "autovacuum_max_workers" higher.
> 
> No, that wouldn't help. If you just increase autovacuum_max_workers, the total cost limit of
> autovacuum_vacuum_cost_limit (or vacuum_cost_limit) is shared by so many workers and it
> further delays autovacuum per each worker. Instead you need to increase autovacuum_vacuum_cost_limit
> as well when you increase the number of workers.

True, I should have mentioned that.

> But, if you do that and also increase workers, well, you would easily reach the limitations
> of the disk. I am not sure it is anywhere advised to have 20 autovacuum_max_workers unless
> i have a disk with lots of IOPS and with very tiny tables across all the databases.

Sure, if you have a high database load, you will at some point exceed the limits of
the machine, which is not surprising.  What I am trying to say is that you have to ramp
up the resources for autovacuum together with increasing the overall workload.
You should consider autovacuum as part of that workload.

If your machine cannot cope with the workload any more, you have to scale, which
is easily done by adding more machines if you have many databases.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-performance by date:

Previous
From: Avinash Kumar
Date:
Subject: Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.
Next
From: Avinash Kumar
Date:
Subject: Re: pg_attribute, pg_class, pg_depend grow huge in count and sizewith multiple tenants.