Re: How many threads/cores Postgres can utilise? - Mailing list pgsql-general

From Craig Ringer
Subject Re: How many threads/cores Postgres can utilise?
Date
Msg-id 4BD8072A.7070005@postnewspapers.com.au
Whole thread Raw
In response to How many threads/cores Postgres can utilise?  (Piotr Kublicki <Piotr.Kublicki@iop.org>)
List pgsql-general
On 28/04/10 17:15, Piotr Kublicki wrote:
>
>
>
> Dears,
>
> Sorry to be a royal pain, but I cannot find it anywhere in the
> documentation: how many threads/CPU cores Postgres v. 8.4 can utilise?
> We're thinking about installing Postgres on a virtual machine (RedHat 5
> 64-bits), however not sure how many CPUs can be wisely assigned, without
> wasting of resources. Can Postgres utilise multi-core/multi-threaded
> architecture in a reasonably extent?

PostgreSQL is good at using multiple cores for multiple concurrent
queries/clients, but is almost completely incapable of using multiple
cores to speed up single big queries.

If your workload is "lots and lots of simpler queries" then you want
many cores. If you workload is a few big complex queries, you want fewer
cores but very fast ones.

About the only benefit that a single big query gets from spare cores is
that the OS can do some other housekeeping work using the other core(s).

--
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

pgsql-general by date:

Previous
From: Vincenzo Romano
Date:
Subject: Re: Notification of Limited Account Access
Next
From: dipti shah
Date:
Subject: Re: Syntax error in spi_prepare usage