Re: Using Threads?

Поиск
Список
Период
Сортировка
От Adam Haberlach
Тема Re: Using Threads?
Дата
Msg-id 20001204151659.A30808@ricochet.net
обсуждение исходный текст
Ответ на Re: Using Threads?  (Bruce Guenter <bruceg@em.ca>)
Ответы Re: Using Threads?  (Dan Lyke <danlyke@flutterby.com>)
Re: Using Threads?  (Bruce Guenter <bruceg@em.ca>)
Список pgsql-hackers
On Mon, Dec 04, 2000 at 02:28:10PM -0600, Bruce Guenter wrote:
> On Mon, Nov 27, 2000 at 11:42:24PM -0600, Junfeng Zhang wrote:
> > I am new to postgreSQL. When I read the documents, I find out the Postmaster
> > daemon actual spawns a new backend server process to serve a new client
> > request. Why not use threads instead? Is that just for a historical reason,
> > or some performance/implementation concern?
> 
> Once all the questions regarding "why not" have been answered, it would
> be good to also ask "why use threads?"  Do they simplify the code?  Do
> they offer significant performance or efficiency gains?  What do they
> give, other than being buzzword compliant?
Typically (on a well-written OS, at least), the spawning of a thread
is much cheaper then the creation of a new process (via fork()).  Also,
since everything in a group of threads (I'll call 'em a team) shares the
same address space, there can be some memory overhead savings.

-- 
Adam Haberlach           |"California's the big burrito, Texas is the big
adam@newsnipple.com      | taco ... and following that theme, Florida is
http://www.newsnipple.com| the big tamale ... and the only tamale that 
'88 EX500                | counts any more." -- Dan Rather 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Wrong FOR UPDATE lock type
Следующее
От: Alex Perel
Дата:
Сообщение: INSERT INTO ... SELECT problem