OPCache wasted memory grows rapidly
| From: | Alex | Date: | Sun, 08 Nov 2020 14:37:36 +0000 |
| Subject: | OPCache wasted memory grows rapidly | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-31497@lists.php.net to get a copy of this message | ||
Hi there,
I run PHP 7.4.12 on a Windows 2019 IIS10 server.
For some reason, the wasted memory value in PHP Opcache grows rapidly. 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 could fill up my entire 2GB allocated to Opcache.
Also the default value of 5% wasted memory which should trigger an reset on Opcache, it does not
seem to work.
I monitor Opcache via opcache-gui.
Why does this happen? is it an opcache bug?
Thanks
Alex