pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
utilising multi-cpu/core machines?
5+ messages / 5 participants
[nested] [flat]

* utilising multi-cpu/core machines?
@ 2007-09-05 22:41 Thomas Finneid <tfinneid@student.matnat.uio.no>
  2007-09-05 23:02 ` Re: utilising multi-cpu/core machines? Jonah H. Harris <jonah.harris@gmail.com>
  2007-09-06 00:07 ` Re: utilising multi-cpu/core machines? Trevor Talbot <quension@gmail.com>
  2007-09-06 13:46 ` Re: utilising multi-cpu/core machines? Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2007-09-07 09:50 ` Re: utilising multi-cpu/core machines? Sven Geisler <sgeisler@aeccom.com>
  0 siblings, 4 replies; 5+ messages in thread

From: Thomas Finneid @ 2007-09-05 22:41 UTC (permalink / raw)
  To: pgsql-performance

Hi

I couldnt find any specifics on this subject in the documentation, so I 
thought I'd ask the group.

how does pg utilise multi cpus/cores, i.e. does it use more than one 
core? and possibly, how, are there any documentation about this.

thomas



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: utilising multi-cpu/core machines?
  2007-09-05 22:41 utilising multi-cpu/core machines? Thomas Finneid <tfinneid@student.matnat.uio.no>
@ 2007-09-05 23:02 ` Jonah H. Harris <jonah.harris@gmail.com>
  3 siblings, 0 replies; 5+ messages in thread

From: Jonah H. Harris @ 2007-09-05 23:02 UTC (permalink / raw)
  To: Thomas Finneid <tfinneid@student.matnat.uio.no>; +Cc: pgsql-performance

On 9/5/07, Thomas Finneid <tfinneid@student.matnat.uio.no> wrote:
> how does pg utilise multi cpus/cores, i.e. does it use more than one
> core? and possibly, how, are there any documentation about this.

Unlike other systems which manage their own affinity and
prioritization, Postgres relies solely on the OS to handle process
management across multiple CPUs/cores.

-- 
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: utilising multi-cpu/core machines?
  2007-09-05 22:41 utilising multi-cpu/core machines? Thomas Finneid <tfinneid@student.matnat.uio.no>
@ 2007-09-06 00:07 ` Trevor Talbot <quension@gmail.com>
  3 siblings, 0 replies; 5+ messages in thread

From: Trevor Talbot @ 2007-09-06 00:07 UTC (permalink / raw)
  To: Thomas Finneid <tfinneid@student.matnat.uio.no>; +Cc: pgsql-performance

On 9/5/07, Thomas Finneid <tfinneid@student.matnat.uio.no> wrote:

> how does pg utilise multi cpus/cores, i.e. does it use more than one
> core? and possibly, how, are there any documentation about this.

PostgreSQL creates a new process to handle each connection to the
database.  Multiple sessions can therefore spread across multiple
cores, but a single session will never use more than one.



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: utilising multi-cpu/core machines?
  2007-09-05 22:41 utilising multi-cpu/core machines? Thomas Finneid <tfinneid@student.matnat.uio.no>
@ 2007-09-06 13:46 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  3 siblings, 0 replies; 5+ messages in thread

From: Kevin Grittner @ 2007-09-06 13:46 UTC (permalink / raw)
  To: pgsql-performance; Thomas Finneid <tfinneid@student.matnat.uio.no>

>>> On Wed, Sep 5, 2007 at  5:41 PM, in message <46DF3082.7040301@ifi.uio.no>,
Thomas Finneid <tfinneid@student.matnat.uio.no> wrote: 
> how does pg utilise multi cpus/cores, i.e. does it use more than one 
> core? and possibly, how, are there any documentation about this.
 
For portability reasons PostgreSQL doesn't use threads, per se, but spawns
a new process for each connection, and a few for other purposes.  Each
process may be running on a separate CPU, but a single connection will
only be using one -- directly, anyway.  (The OS may well be using the
other for I/O, etc.)
 
For documentation, you could start with this:
 
http://www.postgresql.org/docs/8.2/interactive/app-postgres.html
 
-Kevin
 





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: utilising multi-cpu/core machines?
  2007-09-05 22:41 utilising multi-cpu/core machines? Thomas Finneid <tfinneid@student.matnat.uio.no>
@ 2007-09-07 09:50 ` Sven Geisler <sgeisler@aeccom.com>
  3 siblings, 0 replies; 5+ messages in thread

From: Sven Geisler @ 2007-09-07 09:50 UTC (permalink / raw)
  To: Thomas Finneid <tfinneid@student.matnat.uio.no>; +Cc: pgsql-performance

Hi Thomas,

PostgreSQL does scale up very well. But you have to keep in mind that
this also depends on profile of the application you're on PostgreSQL.

Insufficient memory and slow disk systems can interfere PostgreSQL.
Another issue is contention if the server has more than 4 cpus.
(Please check out discussions about "context strom" in this group.)

Anyhow, I had create a benchmark for my company which shows the scale up
of PostgreSQL 8.1.4. This benchmark does try to enforce contention
because of the profile of our application.

Clients/scale-up factor
1	1
2	1,78
3	2,47
4	3,12
5	3,62
6	4,23
7	4,35
8	4,79
9	5,05
10	5,17

Scale-up factor is relative to one client the number of completed
queries in a time frame. (throughput)

This test was done on a 16 core Intel-box (4-way Xeon E7340).

The results of TPC-B benchmark are looking similar.

Sven.


Thomas Finneid schrieb:
> Hi
> 
> I couldnt find any specifics on this subject in the documentation, so I
> thought I'd ask the group.
> 
> how does pg utilise multi cpus/cores, i.e. does it use more than one
> core? and possibly, how, are there any documentation about this.
> 
> thomas
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

-- 
Sven Geisler <sgeisler@aeccom.com>   Tel +49.30.921017.81  Fax .50
Senior Developer, AEC/communications GmbH & Co. KG Berlin, Germany



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2007-09-07 09:50 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-09-05 22:41 utilising multi-cpu/core machines? Thomas Finneid <tfinneid@student.matnat.uio.no>
2007-09-05 23:02 ` Jonah H. Harris <jonah.harris@gmail.com>
2007-09-06 00:07 ` Trevor Talbot <quension@gmail.com>
2007-09-06 13:46 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2007-09-07 09:50 ` Sven Geisler <sgeisler@aeccom.com>

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