Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the theoretical performance limits on web servers?

In a currently deployed web server, what are the typical limits on its performance?

I believe a meaningful answer would be one of 100, 1,000, 10,000, 100,000 or 1,000,000 requests/second, but which is true today? Which was true 5 years ago? Which might we expect in 5 years? (ie, how do trends in bandwidth, disk performance, CPU performance, etc. impact the answer)

If it is material, the fact that HTTP over TCP is the access protocol should be considered. OS, server language, and filesystem effects should be assumed to be best-of-breed.

Assume that the disk contains many small unique files that are statically served. I'm intending to eliminate the effect of memory caches, and that CPU time is mainly used to assemble the network/protocol information. These assumptions are intended to bias the answer towards 'worst case' estimates where a request requires some bandwidth, some cpu time and a disk access.

I'm only looking for something accurate to an order of magnitude or so.

like image 422
John McAleely Avatar asked Mar 11 '09 16:03

John McAleely


2 Answers

Read http://www.kegel.com/c10k.html. You might also read StackOverflow questions tagged 'c10k'. C10K stands for 10'000 simultaneous clients.

Long story short -- principally, the limit is neither bandwidth, nor CPU. It's concurrency.

like image 179
vartec Avatar answered Oct 06 '22 00:10

vartec


Six years ago, I saw an 8-proc Windows Server 2003 box serve 100,000 requests per second for static content. That box had 8 Gigabit Ethernet cards, each on a separate subnet. The limiting factor there was network bandwidth. There's no way you could serve that much content over the Internet, even with a truly enormous pipe.

In practice, for purely static content, even a modest box can saturate a network connection.

For dynamic content, there's no easy answer. It could be CPU utilization, disk I/O, backend database latency, not enough worker threads, too much context switching, ...

You have to measure your application to find out where your bottlenecks lie. It might be in the framework, it might be in your application logic. It probably changes as your workload changes.

like image 26
George V. Reilly Avatar answered Oct 05 '22 23:10

George V. Reilly