opcache memory per vhost instead of shared
Currently Opcache is written in a shared memory it should be stored in the user's home folder. One client can see the all the scripts stored from all the sites hosted in the server.
Thank you for your input!
Unfortunately, we have to close your request because it has not become quite popular for further implementation over the years.
—
IG
-
Steve Y commented
Setting each site to use FastCGI instead of PHP-FPM should accomplish separate caches since there will be separate PHP processes per site. That's how we ran with earlier versions of Plesk.
In Plesk Onyx, at least, the PHP settings have a "disable_functions" selection with "opcache_get_status" disabled by default. This will cause client sites to not be able to detect opcache is on or list files. (right above that setting opcache is shown on/off, and clients can't change these settings.)
-
Martin Hotmann commented
I would also recommend to implement OPCache per vhost.
If I run 3 Sites in PHP 7.1.9 with FPM " sites are fast and one slow because all share the same OPCache Memory. I got 50GB of RAM, so this is enough but I would like to have an option so select. Which is creating OPCache for every vhost or better, for every Domain/Subdomain. so that everything is more stable/faster/more secure and more scalable.Otherwise my "Web-Hosting" Lisence of lesk does not make any sence if I have to setup a new Plesk machine for every single website.
Pls implement this.
-
Madalin Ignisca commented
One thing, Plesk can't change this like next thing in the next release :(
First to explain how PHP-FPM works and how the other PHP integrations for Apache work.
1. PHP-FPM supports OPCACHING (any extension OPCACHE, APC, XCACHE) at root level in shared memory. So this can't be changed by Plesk and it has been a discussion for years in the PHP community. OPCACHING was never something that people involved in the PHP development intended for Shared Hosting and they won't change their minds easily. A way to do it, financial support the developers to work on features.
2.Other ways of using PHP in Apache, like fastcgi, cgid, fcgid don't truly support the requirements of OPCACHING as they start a new process on every request. It just they way they were built and won't change.
How can you get OPCACHING per each client?
Now my concept is a bit different on how is in Plesk today, as currently it is optimised to minimise RAM consumption.
To have isolated OPCACHE per client, you need to create separate PHP-FPM processes per Client.
This implies to have as much RAM as necessary per each PHP-FPM service created.For the cheap hosting fans, this will create high issues.
Having separate PHP-FPM services per client also increases security, a lot. Also stability.
So, if this would be the choosed solution, would you choose to need more RAM, but gain stability, security and performance, or you'd choose to go cheap and ignore benefits?