AW: Using Threads?

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: AW: Using Threads?
Date: 2000-12-11 10:54:03
Message-ID: 11C1E6749A55D411A9670001FA68796336816E@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > The cons side of processes model is not the startup time. It is about
> > kernel resource and context-switch cost. Processes consume much more
> > kernel resource than threads, and have a much higher cost for context
> > switch. The scalability of threads model is much better than that of
> > processes model.
>
> My question here is how much do we really context switch. We
> do quite a
> bit of work for each query, and I don't see us giving up the CPU very
> often, as would be the case for a GUI where each thread does a little
> work and goes to sleep.

Every IO gives up the CPU ! In a threaded model the process could use up it's
CPU timeslice for other clients.

The optimum would be a multi process multi threaded server. But this only starts to
show an effect if there are a lot of clients (thousands).

Andreas

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-12-11 10:58:57 AW: Using Threads?
Previous Message Zeugswetter Andreas SB 2000-12-11 08:41:10 AW: Oracle-compatible lpad/rpad behavior