Concurrency models (was: Timer)
Ian Bicking
ianb at colorstudy.com
Mon Oct 27 20:58:51 EST 2003
On Monday, October 27, 2003, at 01:53 PM, Alan Kennedy wrote:
> I think threads are really a useful abstraction for programmers who
> are learning to deal with developing servers for the first time. And
> threads fulfill their function very well, to a point.
>
> But they have fundamental scalability problems: The C10K problem
> illustrates this well: Surely it should be possible for a modern
> computer, with giga-everything (!), to serve 10,000 clients
> simultaneously?
Fundamental scalability problems hit very few people. And in fact
there's nothing fundamental about them -- the particular of the
interpreter and your concurrency model are only a very small part of
the performance of a complex application. Using threads or async and
heavy caching, maybe you could outperform by two a multi-process model,
making non-SMP scalability unimportant. Or using multiple processes,
you might be able to more simply migrate applications to other
computers. Real programs have a wide variety of constraints.
I'm unimpressed with most theoretical performance measurements. O(n)
analysis is, for most problems, meaningless, since it ignores
non-scaling costs that can be very important. SMP scalability is
another concern I'm unimpressed with -- maybe you can get four times
the performance with an SMP system, but so what? It only counts if
it's processor-bound, which isn't a lot of applications, and four times
the performance isn't scalability, it just means you can wait a little
longer before you partition or parallelize the task for separate
servers.
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Python-list
mailing list