ID: 41713
User updated by: mplomer at gmx dot de
Reported By: mplomer at gmx dot de
-Status: Feedback
+Status: Open
Bug Type: Performance problem
Operating System: win32 only
PHP Version: 5.2.4-dev 2007-06-26 00:09
New Comment:
OK, it took me some time to get FastCGI running, but now it works,
and yes ... I can reproduce it there, too.
To be more detailed, I set up the following environment:
- Apache 2.0.59 (minimalistic configuration) with
mod_fastcgi-SNAP-0404142202-AP2.dll
- Configured FastCGI with 1 process:
FastCgiServer ../php5/php-cgi.exe -processes 1
- PHP 5.2.3 (without php.ini; only php-cgi.exe and php5ts.dll)
- and the test-script with 400,000 array elements:
<?php
$elementCount = 400000;
for ($i = 0; $i < $elementCount; $i++) {
$variables[$i] = 'x';
}
?>
Reproducing by looking at the Task-Manager's memory usage
values after each execution of the script:
- Freshly starting Apache
- Child process "php-cgi.exe" is started
[php-cgi.exe consumes ~ 4.1 MB]
- Execute the test-script the first time:
[php-cgi.exe consumes ~ 4.8 MB]
- Execute one more time: [php-cgi.exe consumes ~ 4.8 MB]
- Execute one more time: [php-cgi.exe consumes ~ 5.3 MB]
... might be OK so long
- Execute one more time: [php-cgi.exe consumes ~ 36.4 MB !!!]
... from now on this is not OK anymore
- Execute one more time: [php-cgi.exe consumes ~ 36.7 MB]
- Execute one more time: [php-cgi.exe consumes ~ 6.1 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.4 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.5 MB]
- Execute one more time: [php-cgi.exe consumes ~ 7.7 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.7 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.8 MB]
- Execute one more time: [php-cgi.exe consumes ~ 5.8 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.4 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.5 MB]
- Execute one more time: [php-cgi.exe consumes ~ 10.6 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.7 MB]
- Execute one more time: [php-cgi.exe consumes ~ 36.8 MB]
- Execute one more time: [php-cgi.exe consumes ~ 5.5 MB]
- ...
This is always reproducable, and the memory usage values
are quite the same on each reproducion. (They differ only
sometimes in 4-12 KB.)
But you see, there is a systematic. There are 2 executions,
after which the memory is not freed, and after the third
execution, the memory is mostly freed.
Any ideas for further testing?
Previous Comments:
------------------------------------------------------------------------
[2007-06-28 00:41:49] [EMAIL PROTECTED]
Thank you, at least we know it only happens with Windows.
Have you tried running PHP as FastCGI under windows?
That might cure this too..
------------------------------------------------------------------------
[2007-06-27 20:56:14] mplomer at gmx dot de
OK, no problem. ... Today I tested this with apache worker, but I still
cannot reproduce it under linux.
I used a Debian 4.0 system and I compiled Apache 2.2.4 with:
./configure --prefix=/usr/local/apache2 --with-included-apr
--with-mpm=worker --enable-so
... and PHP 5.2.3 with:
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache2/bin/apxs --enable-memory-limit
So phpinfo() said, "Thread Safety" is enabled. And I played around with
the elementCount ... but under linux the memory is always completely
freed.
If you have some tips to track this down inside PHP, please let me
know. I now have a working PHP build-environment under windows.
------------------------------------------------------------------------
[2007-06-27 11:54:27] [EMAIL PROTECTED]
It's most likely a ZTS issue, so testing on *nix with e.g. apache
worker and apache2handler SAPI might be a good idea too..
------------------------------------------------------------------------
[2007-06-27 11:42:32] [EMAIL PROTECTED]
Too bad we don't have any developers maintaining Windows port on a
daily basis.
So you're encouraged to help us and investigate the issue.
Any additional information you can find would be appreciated.
------------------------------------------------------------------------
[2007-06-26 11:37:27] mplomer at gmx dot de
It seems so. I could reproduce it only under windows yet. (See my
comment from [17 Jun 9:04am UTC]).
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/41713
--
Edit this bug report at http://bugs.php.net/?id=41713&edit=1