AW: Using Threads?

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB
Тема AW: Using Threads?
Дата
Msg-id 11C1E6749A55D411A9670001FA687963368167@sdexcsrv1.f000.d0188.sd.spardat.at
обсуждение исходный текст
Ответы Re: Using Threads?  (Bruce Guenter <bruceg@em.ca>)
Список pgsql-hackers
> And using the following program for timing thread creation 
> and cleanup:
> 
> #include <pthread.h>
> 
> threadfn() { pthread_exit(0); }

I think you would mainly need to test how the system behaves, if 
the threads and processes actually do some work in parallel, like:

threadfn() {int i; for (i=0; i<10000000;) {i++}; pthread_exit(0); }

In a good thread implementation 10000 parallel processes tend to get way less 
cpu than 10000 parallel threads, making threads optimal for the very many clients case
(like > 3000).

Andreas


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: INSERT INTO ... SELECT problem
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: beta testing version