Re: [HACKERS] Logic behind parallel default? WAS: Rename max_parallel_degree?
Josh berkuswrites: > On 05/31/2016 11:10 AM, Tom Lane wrote: >> The 9.6 open-items list cites >> https://www.postgresql.org/message-id/flat/20160420174631.3qjjhpwsvvx5b...@alap3.anarazel.de > Looks like we didn't decide for the release, just the beta. Indeed. I think it's premature to have this discussion. The plan was to evaluate near the end of beta, when we (hopefully) have a better feeling for how buggy parallel query is likely to be. > Also, defaulting to off lets users make more use of the parallel_degree > table attribute to just enable parallelism on select tables. Well, that's an interesting point. The current coding is that parallel_degree is an upper limit on per-table workers, and max_parallel_degree also limits it. So if you want parallel scans only on a small set of tables, parallel_degree is not an especially convenient way to get to that. Whether we measure it in workers or cores doesn't change this conclusion. It might be worth reconsidering what per-table knobs we should provide exactly, but that's orthogonal to the main point under discussion. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logic behind parallel default? WAS: Rename max_parallel_degree?
On 05/31/2016 11:10 AM, Tom Lane wrote: > Josh berkuswrites: >> Is there a thread on how we determined this default of 2? I can't find >> one under likely search terms. > > The 9.6 open-items list cites > > https://www.postgresql.org/message-id/flat/20160420174631.3qjjhpwsvvx5b...@alap3.anarazel.de Looks like we didn't decide for the release, just the beta. I can see two ways to go for the final release: 1. Ship with max_parallel_X = 2 (or similar) and a very low max_worker_processes (e.g. 4). 2. Ship with max_parallel_X = 1 (or 0, depending), and with a generous max_worker_processes (e.g. 16). Argument in favor of (1): we want parallelism to work out of the gate for users running on low-concurrency systems. These settings would let some parallelism happen immediately, without overwhelming a 4-to-8-core system/vm. Tuning for the user would then be fairly easy, as we could just tell them "set max_worker_processes to half the number of cores you have". Argument in favor of (2): parallelism is potentially risky for .0, and as a result we want it disabled unless users choose to enable it. Also, defaulting to off lets users make more use of the parallel_degree table attribute to just enable parallelism on select tables. Thoughts? -- -- Josh Berkus Red Hat OSAS (any opinions are my own) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logic behind parallel default? WAS: Rename max_parallel_degree?
On 05/31/2016 11:05 AM, Josh berkus wrote: On 05/31/2016 11:00 AM, Tom Lane wrote: ! If this occurs, the plan will run with fewer workers than expected, ! which may be inefficient. The default value is 2. Setting this ! value to 0 disables parallel query execution. Is there a thread on how we determined this default of 2? I can't find one under likely search terms. I'm concerned about the effect of overallocating parallel workers on systems which are already running out of cores (e.g. AWS instances), and run with default settings. Possibly max_parallel_workers takes care of this, which is why I want to understand the logic here. I don't remember the thread but I seem to recall that the default of 2 is explicitly during Beta, RC etc... so that we can see what happens. Robert could speak better to that. JD -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are honest with them. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logic behind parallel default? WAS: Rename max_parallel_degree?
Josh berkuswrites: > Is there a thread on how we determined this default of 2? I can't find > one under likely search terms. The 9.6 open-items list cites https://www.postgresql.org/message-id/flat/20160420174631.3qjjhpwsvvx5b...@alap3.anarazel.de regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Logic behind parallel default? WAS: Rename max_parallel_degree?
On 05/31/2016 11:00 AM, Tom Lane wrote: > ! If this occurs, the plan will run with fewer workers than expected, > ! which may be inefficient. The default value is 2. Setting this > ! value to 0 disables parallel query execution. Is there a thread on how we determined this default of 2? I can't find one under likely search terms. I'm concerned about the effect of overallocating parallel workers on systems which are already running out of cores (e.g. AWS instances), and run with default settings. Possibly max_parallel_workers takes care of this, which is why I want to understand the logic here. -- -- Josh Berkus Red Hat OSAS (any opinions are my own) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers