Re: How many threads/cores Postgres can utilise?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Piotr Kublicki <Piotr(dot)Kublicki(at)iop(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How many threads/cores Postgres can utilise?
Date: 2010-04-28 10:00:10
Message-ID: 4BD8072A.7070005@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message dipti shah 2010-04-28 10:07:46 Re: Syntax error in spi_prepare usage
Previous Message Vincenzo Romano 2010-04-28 09:28:46 Re: Notification of Limited Account Access