AW: Using Threads?
От | Zeugswetter Andreas SB |
---|---|
Тема | AW: Using Threads? |
Дата | |
Msg-id | 11C1E6749A55D411A9670001FA68796336816E@sdexcsrv1.f000.d0188.sd.spardat.at обсуждение исходный текст |
Список | 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
В списке pgsql-hackers по дате отправления: