#22721 [Asn->Ctl]: _php_stream_copy_to_mem performance sucks on systems without mmap support
| From: | wez@php.net | Date: | Fri, 25 Apr 2003 10:43:11 +0000 |
| Subject: | #22721 [Asn->Ctl]: _php_stream_copy_to_mem performance sucks on systems without mmap support | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38360@lists.php.net to get a copy of this message | ||
ID: 22721
Updated by: wez@php.net
Reported By: shawn at rumental dot com
-Status: Assigned
+Status: Critical
Bug Type: Performance problem
Operating System: win2k
PHP Version: 4.3.2-RC
Assigned To: wez
New Comment:
I must verify/fix this before 4.3.2 goes gold.
Previous Comments:
------------------------------------------------------------------------
[2003-03-26 18:47:28] shawn at rumental dot com
afer running file() about a 2000 times with latest snapshot in win2k
running apache 1.3.27 latest win32 binary
i get this error:
Warning: file(e:\test.txt): failed to open stream: Too many open files
in e:\program files\apache group\apache\htdocs\test\testfile2.php on
line 12
I used handle.exe from sysinternals to view open file handles
http://www.sysinternals.com/ntw2k/freeware/handle.shtml
and all file handles opened via file() appear to still be
open. This is not the case when testing php 422
output from handle.exe:
Apache.exe pid: 1640 MAINFRAME\apache
1e4: File E:\test.txt
1e8: File E:\test.txt
210: File E:\test.txt
... etc
214: File E:\test.txt
and it goes on for the number of times file() accessed the file.
CODE
----
$i=1;
while($i++ <="2000"){
file("e:\\test.txt");
}
------------------------------------------------------------------------
[2003-03-25 18:59:20] wez@php.net
What is the problem?
We need a script to reproduce the problem, along with a description of
what should happen, what does happen and why you think it is wrong.
------------------------------------------------------------------------
[2003-03-25 18:49:18] shawn at rumental dot com
IS THIS BUG STILL BEING WATCHED.
I reopened it there still seems to be a problem with the fix.
------------------------------------------------------------------------
[2003-03-20 21:04:25] shawn at rumental dot com
BIG PROBLEM!
it seems as though opened files via file()
are staying open and preventing service from openeing new files giving
errors.
I checked this with sysineternals utility called handle
------------------------------------------------------------------------
[2003-03-19 19:11:26] shawn at rumental dot com
Benchmarking PHP 4.3.2-RC
Testing file() with 10 iterations with file size: 4096226
file_test(10): 0.8426 secs
WORKS GREAT !
------------------------------------------------------------------------
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/22721
--
Edit this bug report at http://bugs.php.net/?id=22721&edit=1