> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 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.



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to