Bug #80341 [Opn]: OPCache wasted memory grows rapidly and no restart after max_wasted_percentage

From: Date: Mon, 09 Nov 2020 00:10:53 +0000
Subject: Bug #80341 [Opn]: OPCache wasted memory grows rapidly and no restart after max_wasted_percentage
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230209@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80341&edit=1

 ID:                 80341
 User updated by:    alex at ndros dot com
 Reported by:        alex at ndros dot com
 Summary:            OPCache wasted memory grows rapidly and no restart
                     after max_wasted_percentage
 Status:             Open
 Type:               Bug
 Package:            opcache
 Operating System:   Windows 2019
 PHP Version:        7.4.12
 Block user comment: N
 Private report:     N

 New Comment:

Also, the default opcache.max_wasted_percentage of 5% does not seem to work. Nothing happens when 5%
is exceeded.


Previous Comments:
------------------------------------------------------------------------
[2020-11-09 00:09:28] alex at ndros dot com

Description:
------------
I run PHP 7.4.12 on a Windows 2019 IIS10 server.

The wasted memory value in PHP Opcache grows rapidly, fills up my entire 2GB allocated to Opcache,
and then opcache stops working.

For example, these are the statistics after 30mins since the last webserver reset:

total memory: 2.00GB
used memory: 89.00MB
free memory: 1.66GB
wasted memory: 261.36MB (12.76%)

And these are my settings:

opcache.memory_consumption=2048
opcache.cache_id=oc1
opcache.error_log="D:\temp\php\opcache_errors.log"
opcache.validate_timestamps=1
opcache.revalidate_freq=90
opcache.interned_strings_buffer=32
opcache.save_comments=0
opcache.max_file_size=0
opcache.file_update_protection=0
opcache.file_cache_consistency_checks=0
opcache.file_cache="D:\temp\php\opcache_filecache"
opcache.max_accelerated_files=100000

If I leave it to run more time, the wasted memory fills up my entire 2GB allocated to Opcache, and
opcache will simply stop to work. I can verify this be updating .php files and the changes show up
instantly (where normally they take 90 seconds or less, based on my opcache.revalidate_freq).


Thanks
Alex



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80341&edit=1


Thread (13 messages)

« previous php.bugs (#230209) next »