[H-GEN] Apache segfaulting... how to debug

Andrae Muys andrae.muys at braintree.com.au
Thu Jul 10 01:52:15 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

David Jericho wrote:
>>    * Programs using multithreading "for good performance" are
>>      almost always broken by design and should be discarded
>>      immediately.
> I don't agree, but then again, I'm thinking multiprocessor machines. I
> guess it all comes down to what exactly you define as a "thread of
> execution".

The only reasonable interpreation of "thread" is "OS Thread"; as 
'library threads' are only a programming abstraction and therefore 
irrelevant to any discussion of performance[0].  In which case all 
threads give you over processes is copy-by-refererence semantics for the 
parameters, at the expense of lock-contention overhead, cache aliasing, 
and added complexity in library interactions.  You can get performance 
improvements upto the marginal[1] cost of copy-by-value over 
copy-by-reference.[5][7]

There is a very good reason why Erlang[3] uses copy-by-value semantics 
for its threading primatives, and leaves OS threading/copy-by-reference 
to the compiler optimiser[4].

In summary: sorry to say it, but you're wrong mate ;).

Andrae Muys

[0] library threads invariably end up equivalent as co-routines, or 
continuations anyway.

[1] marginal in the stricter differential sense.

[3] Discribed by it's principle author Joe Armstrong as the worlds first 
"Concurrency Oriented Language" to a combined audience of language 
authors and academics without objection.

[4] Same audience applauded when Joe mentioned this!

[5] Worst of all, this optimisation must be tuned to the exact 
Hardware/OS/Compiler/Library/Application combination[6]

[6] Failure to do tuning can often reduce performance to below that of 1 
CPU.

[7] Yes I know these footnotes are out of sequence, Bar-Humbug!

-- 
Andrae Muys                       But can it generate *quantum* Haiku
<andrae.muys at braintree.com.au>    error messages, in Latin, where each
Engineer                          line of the error message is a
Braintree Communications          palindrome? -- Mike Vanier on perl



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list