AW: Using Threads?
AW: Using Threads?
От:
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
Дата:
> > 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