Thursday, October 05, 2006

Throw more threads at it

Why Events Are A Bad Idea (for high-concurrency servers)

An interesting position paper on why parallel programming using threads are better for highly concurrent servers compared to event based approaches. Even though the paper is 3+ years old its more applicable now than it was then in large part because threads have gotten cheaper. How so?

  • High performance thread libraries are part of the Linux kernel since 2.6 (NPTL) and the Solaris 10 kernel both of whom implement a 1x1 model.
  • As memory performance and bandwidth increases the cost of context switches decreases. As a matter of fact reducing the cost of a context switch is baked into the DNA of Sun's Niagara family of processors. AMD had the bright (right) idea to include the memory controller right on the chip. They also switched to a NUMA topology which boosts performance when the data is closer to where it's needed. Intel and IBM continue to increase on chip cache sizes to reduce the frequency and thus the latency associated with having to fetch data from main memory.
  • Massively parallel super computer on a chip is around the corner. Check out:

I could go on but I'll stop here. Click on the link, read the paper, and draw your own conclusions.

No comments:

Post a Comment