Lecture Notes for Client-Server Interfaces

7 March 2002 - Process vs Threads Performance


Thread vs. Process Concurrency


The Contenders


The Results

cl date
Thu Mar 15 14:42:55 EST 2001

cl uname -a
SunOS clayton 5.7 sun4u sparc SUNW,Ultra-5_10

cl g++ -o forktime forktime.cc -lpthread

cl forktime
79 usec for 2000 iterations, 0.0395 usec/iteration.
7817.5 usec per fork() call for 2000 calls.
 104.193 usec per pthread_create() call for 2000 calls.

cl forktime
79 usec for 2000 iterations, 0.0395 usec/iteration.
7864.8 usec per fork() call for 2000 calls.
 109.993 usec per pthread_create() call for 2000 calls.

cl CC -o forktime forktime.cc -lpthread

cl forktime
19 usec for 2000 iterations, 0.0095 usec/iteration.
7803.37 usec per fork() call for 2000 calls.
  82.0435 usec per pthread_create() call for 2000 calls.

cl forktime
19 usec for 2000 iterations, 0.0095 usec/iteration.
7825.22 usec per fork() call for 2000 calls.
 103.33 usec per pthread_create() call for 2000 calls.

cl 


Other Systems


Conclusions


This page last modified on 16 March 2002.