Are there any means to measure time of individual config file/.htaccess parsing and processing in Apache?
I've moved a big .htaccess file into Apache config file (via Include in sites-available) and I'm just wondering how big the real performance gain is.
I've considered pstack or gdb but I'm not sure if these toos provide a time tracking.
I'm working on a similar project myself. My plan is to use
strace -e file -T
to extract the timings for finding the.htaccess
files and then usingawk
to sum them up. You could probably create something more elegant/efficient withdtrace
if your system supports it.Tracking the parsing/execution time is not in my plan as I assume it will be insignificant compared to filesystem access.
The performance gain will depend on several features of your setup including how deeply nested your files are, how fast your filesystem is, how contended your filesystem is, how efficient your filesystem cache is and how often Apache has to go looking for
.htaccess
files. The answer will be unique to your system and you won't know it until you measure it.There is little to none gain as the O.S. would already be caching those highly requested files. And if it shows up, you would have to be plotting graphs to show a medium to long term trends.