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

From: Date: Tue, 25 Jun 2019 11:10:22 +0000
Subject: Bug #78202 [Csd]: 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-221480@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: Closed Type: Bug Package: opcache Operating System: WINNT PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: PR 4307 has been merged, so the signed/unsigned issue should be resolved. Previous Comments: ------------------------------------------------------------------------ [2019-06-25 11:08:23] cmb@php.net Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=4366f22dfcadfa080862c3fcbac8e0e42f05bf62 Log: Fix #78202: Opcache stats for cache hits are capped at 32bit NUM ------------------------------------------------------------------------ [2019-06-25 08:03:29] cmb@php.net The following pull request has been associated: Patch Name: Fix #78202: Opcache stats for cache hits are capped at 32bit NUM On GitHub: https://github.com/php/php-src/pull/4307 Patch: https://github.com/php/php-src/pull/4307.patch ------------------------------------------------------------------------ [2019-06-25 08:02:57] cmb@php.net 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. ------------------------------------------------------------------------ [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 (#221480) next »