Bug #78202 [Opn]: Opcache stats for cache hits, hits and opcache_hit_rate are capped at 32bit NUM

From: Date: Tue, 25 Jun 2019 08:02:57 +0000
Subject: Bug #78202 [Opn]: Opcache stats for cache hits, hits and opcache_hit_rate are capped at 32bit NUM
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221473@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78202&edit=1 ID: 78202 Updated by: cmb@php.net Reported by: arutledge at paycomonline dot com Summary: Opcache stats for cache hits, hits and opcache_hit_rate are capped at 32bit NUM Status: Open Type: Bug Package: opcache Operating System: WINNT PHP Version: Irrelevant Block user comment: N Private report: N New Comment: The respective variables are declared as zend_ulong which is 32bit only on x86. I wouldn't consider this to be a bug, but rather a limitation (similar to file size restrictions). Are you running x86 PHP executables? There is, however, certainly a signed confusion issue. Previous Comments: ------------------------------------------------------------------------ [2019-06-24 21:54:41] arutledge at paycomonline dot com Description: ------------ I have a fairly high usage cluster of 35+ servers. Opcache is reset daily each night. Opcache stats for 'cache hits', 'hits' and 'opcache_hit_rate' appear to be affected by the 'hits' variable which is limited to a maximum number size of 2,147,483,647...or 32bit int. Once this # of hits is reached the number will turn negative and start counting up(going more positive) until it reaches zero and then it will go positive again. Meanwhile the 'opcache_hit_rate' will become a negative number...IE -788% hit rate for example. My concern is if this affects performance? Status dump below for an example server... opcache_enabled true cache_full false restart_pending false restart_in_progress false used_memory 479.96 MB free_memory 288.04 MB wasted_memory 0 bytes current_wasted_percentage 0.00% buffer_size 67,108,864 used_memory 34.91 MB free_memory 29.09 MB number_of_strings 663,003 num_cached_scripts 17,085 num_cached_keys 35,394 max_cached_keys 65,407 hits -2,063,254,866 start_time Sun, 23 Jun 19 07:37:35 -0500 last_restart_time never oom_restarts 0 hash_restarts 0 manual_restarts 0 misses 17,638 blacklist_misses 0 blacklist_miss_ratio 0.00% opcache_hit_rate -108.17% Thank you ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78202&edit=1

« previous php.bugs (#221473) next »