Unix Technical Forum

utilising multi-cpu/core machines?

This is a discussion on utilising multi-cpu/core machines? within the Pgsql Performance forums, part of the PostgreSQL category; --> Hi I couldnt find any specifics on this subject in the documentation, so I thought I'd ask the group. ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 11:29 AM
Thomas Finneid
 
Posts: n/a
Default utilising multi-cpu/core machines?

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 11:29 AM
Jonah H. Harris
 
Posts: n/a
Default Re: utilising multi-cpu/core machines?

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/

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 11:29 AM
Trevor Talbot
 
Posts: n/a
Default Re: utilising multi-cpu/core machines?

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.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 11:29 AM
Kevin Grittner
 
Posts: n/a
Default Re: utilising multi-cpu/core machines?

>>> 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/i...-postgres.html

-Kevin




---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2008, 11:30 AM
Sven Geisler
 
Posts: n/a
Default Re: utilising multi-cpu/core machines?

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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com