Req #73888 [NEW]: realpath_cache should be SHM

From: Date: Sat, 07 Jan 2017 18:40:34 +0000
Subject: Req #73888 [NEW]: realpath_cache should be SHM
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206356@lists.php.net to get a copy of this message
From: spam2 at rhsoft dot net Operating system: PHP version: Irrelevant Package: Performance problem Bug Type: Feature/Change Request Bug description:realpath_cache should be SHM Description: ------------ in theory "realpath_cache" is a nice concept, but when you do repeatly print_r(realpath_cache_get()); you see it's very randomly depending on the forker instance you hit and so it's not really effective - on server with high load and so many hundret processes each maintains it's own cache and the hit rate because ttl is reached drops heavily besides it's not a effective as it should be there are more disadvantages: * you waste memory realpath_cache_size muliplied with process count * clearstatcache() called by applications after file-changes is more or less worthless because only the worker process issuing the command is affected while others still use cached results so this should work like "apcu" with a SHM segment sahred by all workers or since PHP now has 'opcache' shared between workers and doing all sorts of optimizations (include-hack, interned string buffers..) maybe the storage for realpath_cache could even go to 'opcache' at all -- Edit bug report at https://bugs.php.net/bug.php?id=73888&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73888&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73888&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73888&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73888&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73888&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73888&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73888&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73888&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73888&r=support Expected behavior: https://bugs.php.net/fix.php?id=73888&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73888&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73888&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73888&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73888&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73888&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73888&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73888&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73888&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73888&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73888&r=mysqlcfg

« previous php.bugs (#206356) next »