What's the performance difference between a web server serving the same file to 10 people vs. 10 different files to 10 different people?
views:
37answers:
1
+3
A:
Very little.
However if it was serving 1 file to 100,000 people vs. 100,000 files to 100,000 people then you might see a difference, as the single file can be cached in memory whereas the large number may not be able to be cached, so you'd see a lot of disk IO.
This assumes you're talking about static files (e.g. images). If you're talking about scripts then what the script actually does will be the main factor.
Greg
2009-05-14 11:14:24
Yes, in this case I'm thinking about static files
meleyal
2009-05-14 11:19:55
+1. And if any of those 100,000 people share a caching proxy, then the question is different again...
Steve Jessop
2009-05-14 11:21:00
Specifically, we are loading a large random image on each page reuqest. Would there be any performance advantage if every visitor is seeing the same image at the same time?
meleyal
2009-05-14 12:47:34
You will probably see a very small performance gain.
Greg
2009-05-14 12:54:16
Probably not enough to be worth changing your code but it really depends on your exact circumstances
Greg
2009-05-14 12:54:53