Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Dec 1996 11:56:37 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        alexj@motaba.tmc.edu.tw
Cc:        freebsd-current@freebsd.org
Subject:   Re: Amazing to MIT Pthread-1.60b6 & Pthread built in
Message-ID:  <199612101856.LAA04644@phaeton.artisoft.com>
In-Reply-To: <3.0.32.19961210135325.00de1af0@mail.tmc.edu.tw> from "alexj@motaba.tmc.edu.tw" at Dec 10, 96 01:53:25 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 	I wrote a small program to test the performance of MIT
> PThread-1.60b6 (MIT) used in FreeBSD-2.2-ALPHA & the pthread built
> in FBSD-2.2-ALPHA (FBSD).

[ ... ]

> gcc pbench.c -lc_r
> ================================================================
> FreeBSD 2.2-ALPHA built-in PTHREAD test....
> Testing pthread_create() 1000 times...spending 3.228051 seconds

[ ... ]

> pgcc pbench.c
> ================================================================
> MIT PTHREAD 1.60B6 performance test....
> Testing pthread_create() 100000 times...spending 0.1063555 seconds


Some comments:

1)	Why aren't you using gcc or pgcc for both?  This is not a
	valid test unless everything other than the threads code
	itself is equal.

2)	The MIT test does not appear to be using a thread safe C
	library; how can you expect this to work?

3)	There is no obvious explanation for why your MIT iterations
	are 100 time your FreeBSD iterations.  However, since you
	are apparently using statistical profiling methods, this
	would seem to related to thread context switch overhead
	being 100 times less important to the MIT numbers.  This
	is not a valid test unless everything other than the threads
	code itself is equal.  Statistical profiling is *very*
	sensitive to things like this -- that's why it is not a
	good method of benchmarking anything but absolutely
	identical environments with *exactly* one variable change
	(ie: comparing Linux vs. BSD with statistical methods is
	not valid, nor is comparing threading environments on a
	single OS when you change more than just the threading
	environment).

4)	The FreeBSD lock times are better.  Do you have a hypothesis
	why?  Without an interpretation of the results of your test,
	the value of your test is reduced.  This is because we can't
	look at the code and tell if there is a difference between
	what you intended to measure vs. what you actually did measure.

This is not a defense of the FreeBSD code... but I am asking how you
got from your results to the conclusions you drew because of your
results; I don't see a valid logical path that leads from your
results, inevitibly to your conclusions.


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612101856.LAA04644>