Req #73887 [Opn->Asn]: Improve realpath cache eviction strategy
Edit report at https://bugs.php.net/bug.php?id=73887&edit=1
ID: 73887
Updated by: kelunik@php.net
Reported by: maggus dot staab at gmail dot com
Summary: Improve realpath cache eviction strategy
-Status: Open
+Status: Assigned
Type: Feature/Change Request
Package: Performance problem
PHP Version: 7.1.0
-Assigned To:
+Assigned To: kelunik
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2017-01-07 13:45:40] maggus dot staab at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=73887&edit=1
Thread (8 messages)