Re: Linux 2.6 context switching and posix threads performancequestion

From: Arjan van de Ven
Date: Sat Aug 27 2005 - 08:02:10 EST


> I'm asking for some kind of an authoritative answer
> quite urgently. What is the optimum thread amount on 2 CPU SMP system
> running Linux ?

context switching in linux isn't THAT expensive compared to some other
operating systems, but it's not free either.
The optimum is obviously 2 threads, one for each cpu that processes your
network service in a state machine like way. This is why thttpd beats
apache by 10x if not more.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/