RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 623259 - New include() / require() method in PHP 5.3 severely hurts performance
Summary: New include() / require() method in PHP 5.3 severely hurts performance
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: php
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Joe Orton
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-11 17:55 UTC by Andreas Rogge
Modified: 2012-09-25 09:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-25 09:13:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
PHP Bug Tracker 63160 0 None None None 2012-09-25 08:11:58 UTC

Description Andreas Rogge 2010-08-11 17:55:23 UTC
Description of problem:

somewhere in the changeset from php 5.2 to 5.3 the access pattern for include(), include_once(), require() and require_once() changed.
Especially php 5.3 is doing the same fstat() call three times for every included file.

Version-Release number of selected component (if applicable):
- any 5.3 -

How reproducible:
always

Steps to Reproduce:
1. install php 5.3
2. create a file test.php with "<?php include('test2.php') =>" in it
3. touch test2.php
4. run "strace php test.php" and see what happens for the include
  
Actual results:
many calls to lstat() and fstat()

Expected results:
only one fstat() call

Additional info:
See also:
http://bugs.php.net/bug.php?id=49383
http://www.mail-archive.com/php-general@lists.php.net/msg250615.html

We were actually hit by this bug when upgrading the php release on a webcluster (document root shared using gfs2). As the new php release does at least three times as much fstat() calls as 5.1.6 the load on the boxes immediately increased by 300% (from <= 10 to >= 30). Downgrading to php 5.2.14 fixed the issue.
I guess this isn't too bad for non-clustered filesystems, but as stat() has always been a bit slow on gfs doing it unneccessarily often means a severe performance hit.

Comment 2 RHEL Program Management 2010-08-11 18:18:44 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 RHEL Program Management 2010-08-18 21:27:38 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.

Comment 4 Suzanne Logcher 2011-03-28 21:11:47 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains 
unresolved, it has been rejected as it is not proposed as an 
exception or blocker.

Red Hat invites you to ask your support representative to 
propose this request, if appropriate and relevant, in the 
next release of Red Hat Enterprise Linux.

Comment 5 Remi Collet 2012-09-25 09:13:26 UTC
PHP upstream have closed the initial bug as "not a bug".

A new bug is open, and we will try to get this improved in a future PHP Version. But as this would require some interface breaks, it won't be possible to include it in older PHP Versions.

Notice: the use of an opcode cache, such as php-pecl-apc, slightly reduce the effect (only 2 "stat" calls, instead of 3 "fstat")


Note You need to log in before you can comment on or make changes to this bug.