pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Hihn <jhihn@paytimepayroll.com>
To: Bill Moran <wmoran@potentialtech.com>
To: Hervé Piedvache <herve@elma.fr>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: One or more processor ?
Date: Fri, 10 Oct 2003 13:09:34 -0400
Message-ID: <NGBBLHANMLKMHPDGJGAPEEDDCOAA.jhihn@paytimepayroll.com> (raw)
In-Reply-To: <3F86E15C.1010309@potentialtech.com>



> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
> [mailto:pgsql-performance-owner@postgresql.org]On Behalf Of Bill Moran
> Sent: Friday, October 10, 2003 12:42 PM
> To: Hervé Piedvache
> Cc: Postgresql Performance
> Subject: Re: [PERFORM] One or more processor ?
>
>
> Hervé Piedvache wrote:
> > Hi,
> >
> > A simple question about PostgreSQL ... I have a Pentium Xeon
> Quadri processors
> > ...
> > If I do a SQL request ... does PostgreSQL use one or more processor ?
>
> PostgreSQL uses one processor per connection.  If you have 4 simultaneous
> connections, you'll use all four processors (assuming your
> operating system
> is properly designed/configured).
>
> > And if it use only one ... why ?
> > Could you explain me this ;o)
>
> The answer to that is beyond my knowledge, but I have a few guesses:
> 1) Doing so is more complicated than you think.

You need to be able to paralellize the algorithm. Even so, a 99%
paralelizable algorithm over 2 cpus is only 50% faster than 1 cpu. So choose
your poison: 2 processes @100% in 1tu or 1 process at 150% at .66tu (tu=time
unit). This ofcourse is over simplification. I don't think 99% is reasonable
in query processing (though it can depend on the query) so I expect the 2
connection method to be better, unless you only ever have 1 connection.





view thread (14+ messages)  latest in thread

Message-ID: <NGBBLHANMLKMHPDGJGAPEEDDCOAA.jhihn@paytimepayroll.com>
Permalink:  ../NGBBLHANMLKMHPDGJGAPEEDDCOAA.jhihn@paytimepayroll.com/
Also on:    postgresql.org/message-id/NGBBLHANMLKMHPDGJGAPEEDDCOAA.jhihn@paytimepayroll.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: jhihn@paytimepayroll.com, wmoran@potentialtech.com, herve@elma.fr
  Subject: Re: One or more processor ?
  In-Reply-To: <NGBBLHANMLKMHPDGJGAPEEDDCOAA.jhihn@paytimepayroll.com>
  References: <3F86E15C.1010309@potentialtech.com> <NGBBLHANMLKMHPDGJGAPEEDDCOAA.jhihn@paytimepayroll.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox