2 ms·
Actually, asymptotically (as you peel off the overhead) I'm sure they're in a dead tie. Ultimately, serving a static file consists of reading the header, openi
by ajross 18y ago
Actually, asymptotically (as you peel off the overhead) I'm sure they're in a dead tie. Ultimately, serving a static file consists of reading the header, opening the target file and calling the sendfile() syscall. The bulk of the work is obviously the data transfer, and on a modern OS that happens in the kernel. I have a hard time believing that any web server is going to significantly distinguish itself on the basis of header parsing, of all things.
And since when is service of static files a significant performance problem anyway? Unless you're youtube, this is the easy part of web application optimization.
- ComputerGuru 18y agoUnfortunately, if you take a look at the Apache source code you'll see that a ton of hooks are inserted into the entire process all over the place, adding a ton of useless calls that don't benefit you anything in exchange for allowing certain uber-cool tricks to be done in the future by other devs, but unfortunately affecting their own bottom line.
- quasimojo 18y agoit can still saturate a 1gb outbound link, so who cares?
- ajross 18y agoI have read through the apache source, actually. If those hooks are disabled, they're just a branch not taken. Compared to the work of moving a 32k (or whatever) file through the page cache and out the network interface, it's just noise. I'm not holding up apache as a model of clean code, mind you. Like all mature software, it's terribly crufty in places. I'm just saying that serving static files is something that even crufty software can do quickly. If you want to show up apache, this isn't the test to use.