Hi.

Shouldn't we seeing failed lstats if the include_path would be the problem?
And I thought that the php engine itself tries to cache the fileinfo, to
minimize the lstat calls ( see
http://hu.php.net/manual/en/function.clearstatcache.php )
So I think that we shouldn't see this much duplicate lstat calls.

Tyrael

On Sun, Jun 20, 2010 at 9:26 AM, Dinh <pcd...@gmail.com> wrote:

> Hi,
>
> Unfortunately, your web application abused include_path. You can change WP
> source code to include PHP files using absolute path
>
> Regards,
>
> Dinh
>
> On Sun, Jun 20, 2010 at 1:49 PM, Vincenzo D'Amore <v.dam...@gmail.com
> >wrote:
>
> > Hello,
> >
> > to have a performance problem with apache/mod_php5 configuration under
> > heavy
> > load the website becomes too slow.
> > Using strace I found what appears to me a strange behavior
> > The strange behavior I want point out is related to a sequence of
> tentative
> > httpd/mod_php5 does in order to read an php page.
> >
> > In this particular case apache httpd servers tries 8 times before reach
> and
> > read the file (if you want I can send the complete strace output)
> > More strange all these tentative seems to be correctly completed because
> of
> > success (0) return code for each line.
> > Ffor every file should be served by apache httpd, apache httpd tries to
> > lstat all directory in path more times:
> >
> > lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs",
> > {st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> >
> > *FIRST TENTATIVE*
> >
> > lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs",
> > {st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> >
> > *SECOND*
> >
> >  lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> >
> access("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > R_OK) = 0
> >
> > *THIRD*
> >
> > lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs",
> > {st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> >
> > *FOURTH*
> >
> > lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs",
> > {st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> >
> > *FIFTH*
> >
> > lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs",
> > {st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> >
> > *SIXTH*
> >
> > lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> > *SEVENTH (blocked in the middle of path scan)*
> >
> > lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> > lstat("/usr/local/sitipersonali", {st_mode=S_IFDIR|0755, st_size=4096,
> > ...})
> > = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08", {st_mode=S_IFDIR|0777,
> > st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP",
> > {st_mode=S_IFDIR|0755,
> > st_size=13312, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al",
> > {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> > lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps",
> > {st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451",
> > {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs",
> > {st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages",
> > {st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
> >
> >
> lstat("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> >
> > *EIGHT AND FINALLY READ THE FILE*
> >
> >
> >
> open("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > O_RDONLY) = 416
> > fstat(416, {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> >
> >
> open("/usr/local/sitipersonali/sitipersonali08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
> > O_RDONLY) = 417
> > fstat(417, {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
> > mmap(NULL, 1312, PROT_READ, MAP_SHARED, 417, 0) = 0x2b4a96443000
> > munmap(0x2b4a96443000, 1312)            = 0
> > close(417)                              = 0
> > read(416, "<?php\r\n// Make the admin interfa"..., 8192) = 1312
> > read(416, "", 8192)                     = 0
> > read(416, "", 8192)                     = 0
> > close(416)                              = 0
> >
> > Could anybody explain me why I have this behavior and if it is
> attributable
> > to a misconfiguration of php?
> >
> > Best regards,
> > Vincenzo
> >
>
>
>
> --
> Spica Framework: http://code.google.com/p/spica
> http://www.twitter.com/pcdinh
> http://groups.google.com/group/phpvietnam
>

Reply via email to