Bug #66999 [NEW]: Unnecessary system calls when opcache.validate_timestamps is disabled
From: leonid at komarovsky dot info
Operating system: Amazon Linux AMI release 2014.03
PHP version: 5.5.10
Package: opcache
Bug Type: Bug
Bug description:Unnecessary system calls when opcache.validate_timestamps is disabled
Description:
------------
When opcache.validate_timestamps is disabled, there are still
access/stat calls for files that are already in cache.
Expected result:
----------------
No stat/access calls for cached files
Actual result:
--------------
Below is an example of the strace output for the second time the page is
requested
25780 access("/var/www/html/test/app/cache/prod/jms_serializer", W_OK) =
0
25780
access("/var/www/html/test/vendor/jms/serializer/src/JMS/Serializer/Naming/IdenticalPropertyNamingStrategy.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/jms/serializer/src/JMS/Serializer/Naming/PropertyNamingStrategyInterface.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/nelmio/api-doc-bundle/Nelmio/ApiDocBundle/Formatter/HtmlFormatter.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/nelmio/api-doc-bundle/Nelmio/ApiDocBundle/Formatter/AbstractFormatter.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/nelmio/api-doc-bundle/Nelmio/ApiDocBundle/Formatter/FormatterInterface.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/symfony/symfony/src/Symfony/Component/Templating/StreamingEngineInterface.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/twig/twig/lib/Twig/Loader/Filesystem.php",
F_OK) = 0
25780
access("/var/www/html/test/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php",
F_OK) = 0
25780 stat("/var/www/html/test/app/cache/prod/templates.php",
{st_mode=S_IFREG|0775, st_size=18992, ...}) = 0
25780
stat("/var/www/html/test/active_release/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/views",
{st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
25780
stat("/var/www/html/test/active_release/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views",
{st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
25780
stat("/var/www/html/test/active_release/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Resources/views",
{st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
25780
stat("/var/www/html/test/active_release/app/Resources/NelmioApiDocBundle/views",
{st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
25780
stat("/var/www/html/test/active_release/vendor/nelmio/api-doc-bundle/Nelmio/ApiDocBundle/Resources/views",
{st_mode=S_IFDIR|S_ISGID|0775,
--
Edit bug report at https://bugs.php.net/bug.php?id=66999&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66999&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66999&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66999&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66999&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66999&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66999&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66999&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66999&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66999&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66999&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66999&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66999&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66999&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66999&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66999&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66999&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66999&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66999&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66999&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66999&r=mysqlcfg
Thread (2 messages)
- leonid at komarovsky dot info