Thread: SMP-support on PostgreSQL/Cygwin

SMP-support on PostgreSQL/Cygwin

From
"Markus Wollny"
Date:
Hello!

I've got PostgreSQL 7.2 running on Cygwin on a four-processor Win2K
server. Now I sometimes notice processor time being very unevenly
distributed between processors. When I start I time consuming job, at
the beginning it shows up quite evenly on all four processors. The
taskmanager shows 12 process-instances of postgres.exe running. One of
them however seems to consume quite a lot more processing power than the
others - I assume that this one is the daemon-postmaster, which spawns
all the other processes. In a later stage of the test-job, the processor
time on three of the processors seems to be falling, whereas on one of
the four usage remains at a high level. This could indicate that the
postmaster ist running exclusively on this one processor. Hence my
question: Is there no multithreading in this configuration which would
allow for a more evenly distribution of processing time on all available
processors?

Greetings,

   Markus

Re: SMP-support on PostgreSQL/Cygwin

From
"Henshall, Stuart - WCP"
Date:
Hello,
    There is no threading in PostgreSQL, it uses a multi process model
where each connection has a back end process. All the postmaster does is
fork new backends, so unless you are doing a lot of connecting the
postmaster shouldn't be doing much. Therefore a transaction will not use
more than one processor. However it sounds as if you have multiple
connections executing at once, so it may be lock contention or I/O bound.
Increasing shared memory buffers may help.
- Stuart

> -----Original Message-----
> From: Markus Wollny [mailto:Markus.Wollny@computec.de]
> Sent: 07 March 2002 08:57

>
> Hello!
>
> I've got PostgreSQL 7.2 running on Cygwin on a four-processor Win2K
> server. Now I sometimes notice processor time being very unevenly
> distributed between processors. When I start I time consuming job, at
> the beginning it shows up quite evenly on all four processors. The
> taskmanager shows 12 process-instances of postgres.exe running. One of
> them however seems to consume quite a lot more processing
> power than the
> others - I assume that this one is the daemon-postmaster, which spawns
> all the other processes. In a later stage of the test-job,
> the processor
> time on three of the processors seems to be falling, whereas on one of
> the four usage remains at a high level. This could indicate that the
> postmaster ist running exclusively on this one processor. Hence my
> question: Is there no multithreading in this configuration which would
> allow for a more evenly distribution of processing time on
> all available
> processors?
>
> Greetings,
>
>    Markus
>