On Sat, 25 Jan 2003, Sascha Schumann wrote:

> > files list.  It's handy and nice to normalize the path here, but it is
> > really really expensive!
> 
>     ..only on systems with ultra slow syscall setup procedures
>     (e.g. Solaris) or lack of directory cache.
> 
> > Due to our current implementation, if you have a lot of includes, you
> > really should put all your include files in / and you will see some
> > impressive improvements.
> 
>     Can you put some numbers on that?  I've done quite a lot of
>     benchmarking and those calls never appeared on the radar.

Well, take an app that has 30 includes in a directory 5 levels deep.  
Just the realpath() call is going to do 180 stats every time that script
is hit.  Not sure how that wouldn't show up on the radar regardless of the
OS.  You probably don't have anything that has 30 includes, but people out
there write code like that.

>     5. Looking at Linux's syscall implementation and implementing
>     the good ideas in FreeBSD.

Well yes, but fixing the os is pretty drastic.  For now I will be patching 
things here to short-circuit all that stuff, but I think it is also 
something we should look at in general for PHP.  

As for numbers, I basically doubled the req/sec rate of a box by 
eliminating a bunch of system calls caused by include_path and 
open_basedir stat'ing, so in my particular situation here eliminating as 
many syscalls as I can is having a direct effect.

-Rasmus


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to