AW: Using Threads? - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: Using Threads?
Date
Msg-id 11C1E6749A55D411A9670001FA687963368167@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
Responses Re: Using Threads?  (Bruce Guenter <bruceg@em.ca>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: INSERT INTO ... SELECT problem
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: beta testing version