Req #73887 [NEW]: Improve realpath cache eviction strategy
| From: | maggus dot staab at gmail dot com | Date: | Sat, 07 Jan 2017 13:45:43 +0000 |
| Subject: | Req #73887 [NEW]: Improve realpath cache eviction strategy | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-206348@lists.php.net to get a copy of this message | ||
From: maggus dot staab at gmail dot com
Operating system:
PHP version: 7.1.0
Package: Performance problem
Bug Type: Feature/Change Request
Bug description:Improve realpath cache eviction strategy
Description:
------------
We recently changed the default realpath cache size as we realized that
the default size is too small, see
https://github.com/php/php-src/pull/2271.
After a closer look into the realpath cache impl krakjoe and bwoebi
mentioned, that cache eviction of this cache is very suboptiomal. Cache
items are only evicted after a find. Entries never get evicted when no
longer used.
Php is forced todo some expensive file-io operations when the realpath
cache cannot deliver the information from memory. This is especially
expensive for long running php scripts, like cli based
processes/webservers/...
A first improvement would be some kind garbage collection, which isnt
bound to a previous find.
2nd the cache could benefit from some kind of LRU cache.
3rd krakjoe mentioned that it might be sometimes usefull to share the
cache information in shm.
Related discussion:
http://chat.stackoverflow.com/transcript/message/34952738#34952738
Starting 5:32 PM
--
Edit bug report at https://bugs.php.net/bug.php?id=73887&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73887&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73887&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73887&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73887&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73887&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73887&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73887&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73887&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73887&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73887&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73887&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73887&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73887&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73887&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73887&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73887&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73887&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73887&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73887&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73887&r=mysqlcfg