News for hackers. Stuff that matters.
Re:Don't Bet on Moore Saving Your Ass by axod on Wednesday January 07, 2009 @04:07PM (#423956)
I don't think this discussion is going anywhere, but for reference, my webserver does around 45 million requests a day, and yes, that's in a single thread. Webservers aren't typically cpu bound.
Re:Don't Bet on Moore Saving Your Ass by ars on Wednesday January 07, 2009 @04:25PM (#423981)
Thanks for the numbers, 45 million and 5k are kinda different.

I'm not trying to be argumentative, I have never done a very large scale website, and only now did I check your profile to see that you did.

But I still don't understand how come it's better to do a single thread. Also, all my websites have been CPU bound.

And even if it's IO bound, if you have more than one disk, adding a thread can only help, no?

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.