11 ms·
Anyone profiled a before/after for this?
by Jach 10y ago
Anyone profiled a before/after for this?
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- lucb1e 10y agoThis is what I expected the author to have done. A bit of a disappointing article.
- duskwuff 10y agoYes. The difference is pretty minor; it's a difference of a couple 'stat' calls per request, all of which are guaranteed to be cached in the kernel. If you're serving a lot of static content, it might start to be noticeable, but at that point you're probably better off using a different web server for that content. (Or putting it on a CDN.)
- lucb1e 10y agoI was thinking the same about OS caching, but since the author didn't actually try that out it's still uncertain and a fairly useless article...
- cheiVia0 10y agoFound this: https://thomaslohner.github.io/slides/Performance-Myths/ https://thomaslohner.github.io/slides/Performance-Myths/ ...looks to be at least +10% performance difference without .htaccess with basic static html. Probably more with many lines of rewrite rules.
- Theodores 10y agoSame approach, just done ten years ago: http://colin.mollenhour.com/2010/06/30/the-right-way-to-optimize-apaches-htaccess-files/ http://colin.mollenhour.com/2010/06/30/the-right-way-to-opti... This has stats, again for whatever version Apache was up to decade ago (there was a while between releases). > For my benchmark I ran “ab” (apache bench) since it is quick and easy but admittedly not the best for benchmarking overall site performance. In this case apache bench is going to under state the value of this tweak since one page load in a browser will result in repeated hits on the webserver, all of which will be affected by this optimization. So, I benchmarked on /errors/503.php so that the database is not factored but PHP code is still run. Specifically, I used $ ab -n 1000 -c 20 .../errors/503.php. > Before: ~3000 requests per second (3018 max) > After: ~4600 requests per second (5030 max) > That’s a pretty nice improvement. Unfortunately it is only substantial with fast requests such as the error pages and static files but it should definitely reduce disk contention on a busy server and increase scalability, but probably not do a whole lot for user-experience on a low-contention server.