• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved opcache does not allocate the specified buffer_memory & ~always 100% mem. usage.

Hotte

New Pleskian
I do not understand opcache-settings, if I set opcache.interned_strings_buffer=16 the Status tells me 8M are allocated and nearly used!
Even if it would aloctes the additional block later; it should have done this already because of the usage of buffer_memory?

Also whatever amount of memory (1G or 3G) I set (opcache.memory_consumption) it is alwways used ~100%
All the PHP-Files Hosted are not that big...?

Does anyone have a clou on that ? - THANK YOU!


I also have that with APCu; it does not allocate the 64M but it is also used only 40%

Debian 9 / Plesk 17.8.11 / PHP7.2.14

Here my additionall PHP-Settings:

;SessionSettings
session.serialize_handler = igbinary
session.save_handler = memcached
session.save_path = "localhost:11211"

;OPCACHE SETTINGS
opcache.revalidate_freq=300
opcache.validate_timestamps=1
opcache.max_accelerated_files=32531
opcache.memory_consumption=1024
opcache.interned_strings_buffer=16
opcache.save_comments=1
opcache.max_wasted_percentage=5

;APCu SETTINGS
;apc.shm_segments = 2
apc.shm_size = 64M
apc.entries_hint = 10240
apc.serializer = igbinary

;MEMCACHED SETTINGS
memcached.serializer = igbinary
memcached.sess_locking = 0

;OPCACHE SETTINGS
opcache.revalidate_freq=300
opcache.validate_timestamps=1
opcache.max_accelerated_files=32531
opcache.memory_consumption=1024
opcache.interned_strings_buffer=16
;opcache.fast_shutdown=1
opcache.save_comments=1
opcache.max_wasted_percentage=5


AND opc-Status-gui
PLESKFORUM_opc-gui.png
 
There does not seem to be anything wrong with it. I think this is the normal behavior of a buffer in Linux. Look at your "memory usage", it shows the same behavior, which is correct. All memory is used, and if it is not used for doing something at the moment, it is used as a buffer. Buffers work similar. According to your statistics, your buffer holds 102,110 strings. let's assume each of them is 80 bytes long on average (depending on the character set used anything between 20 and 40 characters, a realistic value) this makes up the 8 MB buffer. It does not mean that the buffer cannot read any more. Old data will be flushed to make room for new data.
 
Hi Peter! thanks for repling :)

It does not work due to Plesk behavior!

I found out, that if i do this settings in /opt/plesk/php/7.x/etc/php.d/10-opcache.ini and restart plesk-phpx-fpm it will work!

The sad thing is, that the System will show you the "right"settings / values but don't use the additionall interface settings for opc/apcu !
So never ever trust these Settings :-D
plesk-opc.PNG

Now I got a better result and the string buffer is used over 8M ;)
opc-gui-inUSE.PNG
 
Back
Top