Configuring Opcache across multiple accounts
Hi,
I have searched on Google and this forum with no luck, apologies if there's an answer to this already, I couldn't find it.
I just provisioned PHP 7 and 7.1 on our dedicated server which hosts several accounts.
Questions:
1. Should the opcache settings be done at a global level on WHM's INI Editor? Or should they be done at an account level separately?
2. Is it possible to allow/disallow specific accounts from using opcache?
3. If settings are done globally and allow anyone on the server, is the code cached separately in each account's directory or is it mixed? If the latter, are there any security issues I should be aware of?
4. If I run a GUI to monitor opcache, would I need one for PHP 7 and another one for PHP 7.1?
Many thanks
-
From what I understand I think you wish to enable opcache per account. To make things simple you need to first enable php-FPM for the account you wish to enable opcache, once php-FPM is on opcache will be on for that account. This action can also be enabled globally. For enabling php-FMP you need to do easyapache for particular version you select. Once php-FPM Enabled on the server you can handle its status per account thought WHM itself, search for php-FPM in WHM and then enable disble status per domain. For different versions of php you will have to independently enable opcache for that php Version. Hope this helps. 0 -
Hello, You can find some general information on Opcache at the following documentation URL: PHP Options - EasyApache 4 - cPanel Documentation The following threads should help: SOLVED - Do I edit /usr/local/lib/php.ini to setup Opcache OPCache config in EA4 Thank you. 0 -
Thanks Michael and @webhostuk A few other questions about Opcache: 1. Are the global settings, global? Meaning, is the 32MB (or whatever value) to be shared across all users or each user gets 32MB? Where are the cached scripts stored in the server? 2. If I want to use a GUI such as github.com/PeeHaa/OpCacheGUI will it have to run from each user's directory or would I need a single global instance? 3. Likewise, would the GUI mentioned in # 2 include stats for opcache across different versions of PHP or would I need to run one separate GUI per each version of PHP that has opcache enabled? 0 -
. Are the global settings, global? Meaning, is the 32MB (or whatever value) to be shared across all users or each user gets 32MB? Where are the cached scripts stored in the server?
The following URLs explain how Opcache works in more detail: OpCache - understanding how the cache works, per user or per resource? PHP Performance I: Everything You Need to Know About OpCode Caches This thread offers some more details you may find helpful as well: SOLVED - Zend OPcache and PHP-FPM. If I want to use a GUI such as github.com/PeeHaa/OpCacheGUI will it have to run from each user's directory or would I need a single global instance?
. Likewise, would the GUI mentioned in # 2 include stats for opcache across different versions of PHP or would I need to run one separate GUI per each version of PHP that has opcache enabled?
I believe the following feature request covers how the existing setup with OPCache works (shared per each PHP version): Zend Opcache User Interface for WHM / cPanel - (with separate cache's for each cpanel account) Thank you.0 -
Thanks @cPanelMichael I have read the links you sent and the last one (Feature Request) mentions what I believe is my solution: If you are prepared to pay, Litespeed can be confured to do this nativly.
Zend Opcache User Interface for WHM / cPanel - (with separate cache's for each cpanel account) I run Litespeed. So to confirm: could I operate entirely separate opcaches, each per user, to avoid file collisions and one user peeking into the other's files etc? Is this something I should discuss with LS or do you have some recommendations / instructions how to do that? If I do it through Litespeed: 1. Would each user have their separate memory allocation for their caches? 2. Would a GUI (such as OpCacheGUI) run locally on each account without affecting others? 3. Would I be able to enable/disable opcache per account, even if they all used the same version of PHP? Many thanks0 -
Hello, You can find more information about how LiteSpeed implements OPCache on their documentation at: [PLAIN]litespeed_wiki:php:opcode_cache [LiteSpeed Wiki][/PLAIN] litespeed_wiki:php:enable_opcode_cache [LiteSpeed Wiki] suEXEC Daemon Mode - LiteSpeed Technologies Inc Let us know if these documents help to answer your questions. Thanks! 0 -
Thanks @cPanelMichael For others reading this, I also got more details from the Litespped support people, hope it helps anyone Googling this. Configuring Zend Opcache on shared environment running cPanel | LiteSpeed Support Forums 0
Please sign in to leave a comment.
Comments
7 comments