Re: PostgreSQL on Dual Processors, Dual-Core AMD Chips - Mailing list pgsql-general

From Neil Conway
Subject Re: PostgreSQL on Dual Processors, Dual-Core AMD Chips
Date
Msg-id 1129762676.8219.78.camel@localhost.localdomain
Whole thread Raw
In response to Re: PostgreSQL on Dual Processors, Dual-Core AMD Chips  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
List pgsql-general
On Tue, 2005-18-10 at 22:21 -0500, Tony Caduto wrote:
> From what i understand Postgresql will scale with more cpus, but not in
> the same way as  threaded server would.

Threading isn't really relevant. PostgreSQL currently forks a new
process for each client connection, and each process can be scheduled on
a different CPU. If PostgreSQL used threads and allocated one thread per
client connection, each thread could be scheduled on a different CPU
(assuming we used kernel threads). So either way the number of
concurrent connections would need to exceed the number of CPUs to scale
effectively.

Now, rather than dedicating a single process/thread to each connection,
another approach would be to share the work of query processing among
threads/processes differently. For example, we could perform a large
sort operation by splitting the input data among N threads/processes,
which could then do the sort in parallel. Postgres currently doesn't do
this, but it doesn't have much to do with threads vs. processes per se
(threads might make this somewhat easier to implement, though).

-Neil



pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: [pgsql-advocacy] Oracle buys Innobase
Next
From: Josh Berkus
Date:
Subject: Re: [HACKERS] 'a' == 'a '