• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Opcache & PHP-FPM Questions

Dec@de42

New Pleskian
Hello everyone,
I am currently trying to understand 2 things in Plesk, or web hosting in general:
Opcache in combination with
PHP-FPM and PHP-FPM Dedicated

(I know there are handlers for PHP-FPM Apache and nginx, but this is not relevant for my question, I guess)

I already found some threads about those topics here at the Plesk forum, like this one and this linked guide, but they are confusing me even more.

So, here is what I found out so far (or what, I believe, is correct. Please correct me if I'm wrong)
  1. PHP-FPM and Dedicated use the same technology, and FPM is currently recommended because it is a more advanced Fast-CGI handler (here)
  2. PHP-FPM Dedicated is more stable & faster because it spawns its process, but also needs slightly more resource than non-dedicated FPM
  3. Opcache values specified in the "Additional configuration directives" for Plans/Subscriptions using PHP-FPM dedicated should work because they are using their own PHP-Handler and therefore have a dedicated opcache memory:
1638819966585.png

If my assumptions above are correct, then my questions are:
  • How do I specify the opcache memory size for the non-dedicated PHP-FPM handlers? Is this php.ini or this 10-opcache file the correct one?
  • Are the non-dedicated ones sharing/using the same opcache memory pool?
    • If yes: Is there any way to make sure every non-dedicated PHP-FPM subscription is getting its chunk of memory, i.e. by specifying a memory limit in the Additional configuration directives?

Thanks in advance for your help!
 
Seems your topic got missed.
If my assumptions above are correct, then my questions are:
  • How do I specify the opcache memory size for the non-dedicated PHP-FPM handlers? Is this php.ini or this 10-opcache file the correct one?
In the php.ini of the corresponding PHP version you can adjust the opcache.memory_consumption value.

  • Are the non-dedicated ones sharing/using the same opcache memory pool?
    • If yes: Is there any way to make sure every non-dedicated PHP-FPM subscription is getting its chunk of memory, i.e. by specifying a memory limit in the Additional configuration directives?
Yes all non-dedicated PHP versions share the opcache memory pool. Thats why the opcache_get_status PHP function is disabled by default. Otherwise different users/customers can view each others opcache objects. There is however no way to distribute opcache memory between users.
 
You can tune it in the corresponding version of 10-opcache.ini ( globally for the sites using that version of PHP )

In those files yon can find the corresponding settings ( most of them commented out )
 
Back
Top