AW: Using Threads?

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Bruce Guenter'" <bruceg(at)em(dot)ca>, pgsql-hackers(at)postgresql(dot)org
Subject: AW: Using Threads?
Date: 2000-12-05 09:07:37
Message-ID: 11C1E6749A55D411A9670001FA687963368167@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-12-05 09:12:24 AW: beta testing version
Previous Message Tom Lane 2000-12-05 05:39:46 Re: INSERT INTO ... SELECT problem