Re: Why is Postgres only using 8 cores for partitioned count? [Parallel Append]

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Why is Postgres only using 8 cores for partitioned count? [Parallel Append]
Date: 2021-02-16 03:20:16
Message-ID: CAApHDvqwycUEc2++3JNFhLS3CsMRx6tGudC6_1JcWrRQHTqy4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 16 Feb 2021 at 02:12, Fabio Pardi <f(dot)pardi(at)portavita(dot)eu> wrote:
>
> On 14/02/2021 22:16, Gavin Flower wrote:
> > While I agree it might be good to be able specify the number of workers, sure it would be possible to derive a suitable default based on the number of effective processors available?
>
> I had the same problem and my conclusion was that it is not possible to go above 8 cores because of Amdahl's law on parallel computing. More here: https://en.wikipedia.org/wiki/Amdahl%27s_law

That would really depend on what the non-parallel part of the equation
was. There are some plan shapes such as GROUP BY or aggregate queries
with very few or just 1 group where the serial portion of the
execution is very small indeed.

David

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2021-02-16 03:23:37 Re: Set a specific database to log_statement='ddl' but others to be log_statement='all'
Previous Message David Rowley 2021-02-16 03:15:41 Re: Why is Postgres only using 8 cores for partitioned count? [Parallel Append]