From: | Mahendra Singh <mahi6run(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Sergei Kornilov <sk(at)zsrv(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Amit Langote <langote_amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, David Steele <david(at)pgmasters(dot)net>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Block level parallel vacuum |
Date: | 2019-12-05 19:25:05 |
Message-ID: | CAKYtNAq5pSSRdvY3ZA_bBROiXotw1mMoZ-o6KSkgLMpB93CyXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 5 Dec 2019 at 19:54, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> [ Please trim excess quoted material from your replies. ]
>
> On Thu, Dec 5, 2019 at 12:27 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> > I agree that there is no point is first to spawn more workers to get
> > the work done faster and later throttle them. Basically, that will
> > lose the whole purpose of running it in parallel.
>
> Right. I mean if you throttle something that would have otherwise
> kept 3 workers running full blast back to the point where it uses the
> equivalent of 2.5 workers, that might make sense. It's a little
> marginal, maybe, but sure. But once you throttle it back to <= 2
> workers, you're just wasting resources.
>
> I think my concern here is ultimately more about usability than
> whether or not we allow throttling. I agree that there are some
> possible cases where throttling a parallel vacuum is useful, so I
> guess we should support it. But I also think there's a real risk of
> people not realizing that throttling is happening and then being sad
> because they used parallel VACUUM and it was still slow. I think we
> should document explicitly that parallel VACUUM is still potentially
> throttled and that you should consider setting the cost delay to a
> higher value or 0 before using it.
>
> We might even want to add a FAST option (or similar) to VACUUM that
> makes it behave as if vacuum_cost_delay = 0, and add something to the
> examples section for VACUUM that suggests e.g.
>
> VACUUM (PARALLEL 3, FAST) my_big_table
> Vacuum my_big_table with 3 workers and with resource throttling
> disabled for maximum performance.
>
Please find some review comments for v35 patch set
1.
+ /* Return immediately when parallelism disabled */
+ if (max_parallel_maintenance_workers == 0)
+ return 0;
+
Here, we should add check of max_worker_processes because if
max_worker_processes is set as 0, then we can't launch any worker so
we should return from here.
2.
+ /* cap by max_parallel_maintenace_workers */
+ parallel_workers = Min(parallel_workers, max_parallel_maintenance_workers);
+
Here also, we should consider max_worker_processes to calculate
parallel_workers. (by default, max_worker_processes = 8)
Thanks and Regards
Mahendra Thalor
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2019-12-05 20:14:34 | Re: backup manifests |
Previous Message | Robert Haas | 2019-12-05 18:46:08 | Re: backup manifests |