Performance difference between if(!-e) and try_files?

Peter Portante peter.a.portante at gmail.com
Thu Jul 15 07:04:53 MSD 2010


FWIW, we ran with "if (!-e...)" for about 2.5 years, filling up our
error.log files with useless messages in the operation of that scheme. It
help hide a number of problems that were not see because the volume of
messages was so high.

By using try_files, we were able to substantially clean up our
implementation, and find and fix a number of problems.

We have not measured performance with this change, but just the fact that
you don't make a log file entry in the error.log is probably a win in and of
itself, I would think.

-peter


On 7/14/10 10:56 PM, "Michael Shadle" <mike503 at gmail.com> wrote:

> I am trying to generate a following in getting a small modification
> added to Drupal that would allow it to work with try_files, as it
> doesn't right now (full explanation here:
> http://drupal.org/node/827236)
> 
> I am wondering though, exactly how many syscalls or savings per
> request you get from using try_files instead of if (!-e
> $request_filename) ? It would be interesting to be able to reference
> some numbers, and I don't trust my debugging skills to get it right.
> Igor, you probably know how many each one makes in your sleep... :)
> would you have any ideas?
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx





More information about the nginx mailing list