News for hackers. Stuff that matters.
Re:So what's wrong with 1975 programming? (2008) by halayli on Wednesday December 05, 2012 @12:08AM (#4874976)
Since each thread is an actual kernel thread, this will limit the concurrent connections to the maximum number of threads a kernel can handle which isn't that high.
Re:So what's wrong with 1975 programming? (2008) by Saavedro on Wednesday December 05, 2012 @12:59AM (#4875113)
Not as such. The connection itself can be accepted and put into a queue on a different thread than the one that serves the request. This means that only the actual number of requests concurrently being fulfilled (cached value is being retrieved from ram or storage, or is being written to the socket) is limited by the amount of kernel threads. With that in place that number doesn't really even have to be that high to handle lots of concurrent load.
Re:So what's wrong with 1975 programming? (2008) by wmf on Wednesday December 05, 2012 @02:12AM (#4875312)
Linux can create over 250,000 threads, but that may have been on a 32-bit system. On 64-bit it should be limited only by RAM.
Re:So what's wrong with 1975 programming? (2008) by halayli on Wednesday December 05, 2012 @02:22AM (#4875332)
The overhead of context switching becomes pretty high. Some say that context switching has become cheap, but you still at the very least need to update the tlb, and schedule the next pthread.
Re:So what's wrong with 1975 programming? (2008) by marshray on Wednesday December 05, 2012 @11:27AM (#4876977)
At least the performance of context switching should scale with the number of cores, which seems to be the main direction of increased performance in hardware looking into the future.