Thread performance (was Re: dynamic context transitions)

Luke Mewburn luke at mewburn.net
Wed Dec 8 01:21:07 GMT 2004


On Sun, Dec 05, 2004 at 09:19:55AM +1100, tridge at samba.org wrote:
  | no, you're still clinging to the notion that threads are somehow
  | inherently faster than processes. They aren't. They are inherently
  | slower, no matter what OS you are talking about.
  | 
  | Some OSes might implement processes so badly that threads come out
  | ahead. It is fundamental computer science that doing operations in a
  | threaded environment will be slower than doing operations in an
  | equivalent process based environment, because they have to do more
  | work.
  | 
  | Using processes allows you to take advantage of a hardware memory
  | protection system. Using threads doesn't.

Do you have research to back this up?

For what application mix ?

Your statements may be true when implementing a service that requires
separate kernel context and memory protection for separate connections
(e.g, CIFS), but there are applications where an N:1 speedup is
achievable across N cpus with a threaded application, and their is
extra measurable overhead of a process context switch over a thread
switch (cache/MMU flush, etc).

(No; I haven't drunk the "thread Kool Aid" per se.)

Cheers,
Luke.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20041208/428bd24e/attachment.bin


More information about the samba-technical mailing list