ID: 49383 User updated by: olga at metacafe dot com Reported By: olga at metacafe dot com Status: Bogus Bug Type: Performance problem Operating System: Red Hat 3.4.6-10 PHP Version: 5.3, 6 New Comment:
When I compare 5.2.9 with 5.3, I see that (a) 5.3 is slower. According to release notes, I was expecting performance improvement, or at least the same performance as in previous version. (b) top 5 system calls in 5.3 take more time that in 5.2.9 lstat() calls are reduced, but fstat(), mmap() and munmap() are used much more than before. Maybe I'm wrong about fstat(), but that's the only difference I found so far. What else could have caused this performance problem? Previous Comments: ------------------------------------------------------------------------ [2009-09-01 15:01:17] ras...@php.net You suppose it is because of fstat? I seriously doubt that. fstat is really fast because it doesn't need to touch the disk at all. It simply grabs the stat struct from an already open file descriptor. If you can show me some profiling numbers where fstat is anywhere on the radar, I'll take a look, but I am highly suspicious that fstat would have anything to do with any performance issues. Disk-touching stats like lstat are the ones you need to worry about. ------------------------------------------------------------------------ [2009-09-01 14:48:03] olga at metacafe dot com Any PHP code does it. The code: <?php echo "Hello!"; ?> The strace: open("[path]/test.php", O_RDONLY) = 16 fstat(16, {st_mode=S_IFREG|0644, st_size=82, ...}) = 0 fstat(16, {st_mode=S_IFREG|0644, st_size=82, ...}) = 0 fstat(16, {st_mode=S_IFREG|0644, st_size=82, ...}) = 0 mmap(NULL, 82, PROT_READ, MAP_SHARED, 16, 0) = 0x2a9a8b4000 munmap(0x2a9a8b4000, 82) = 0 close(16) = 0 ------------------------------------------------------------------------ [2009-08-31 11:48:20] j...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2009-08-31 08:32:54] olga at metacafe dot com Used the snapshot, nothing changed. Fstat() remains high. ------------------------------------------------------------------------ [2009-08-29 00:26:57] j...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ 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/49383 -- Edit this bug report at http://bugs.php.net/?id=49383&edit=1