News for hackers. Stuff that matters.
Re:Don't Bet on Moore Saving Your Ass by axod on Wednesday January 07, 2009 @04:35PM (#423996)
Adding threads only helps if you have more cores, or if you're forced to use something that may block.

But even then, it's better to have a set number of threads doing different tasks, rather than one per user. eg have a network thread, a db thread(s) etc.

Re:Don't Bet on Moore Saving Your Ass by zmimon on Wednesday January 07, 2009 @06:50PM (#424183)
First: this is a really interesting thread and I have a lot of respect for your experience.

But is it really better to statically allocate resources to threads? You may have 8 cores on a box and 1 of them burning and 7 of them cruising. By utilizing a small thread pool and letting the scheduler spin things off dynamically you can turn that into 8 cruising instead.

Just curious.

Re:Don't Bet on Moore Saving Your Ass by axod on Thursday January 08, 2009 @02:20PM (#425453)
The networking thread shouldn't be using hardly any CPU. If it is, then somethings badly wrong. It's better to have a single networking thread, trawling through the connections, moving data around, and have it talking to other threads that handle long jobs, cpu intensive tasks, or anything that might block.