Configuring Zend Opcache on shared environment running cPanel

#1
Hello,

I am running LS on a cPanel dedicated server which hosts several different websites and apps and I want to properly configure Zend Opcache. I have enabled it and provisioned using Easy Apache 4 and can see it is running, but have a few questions:
  1. I have read that I can isolate caches per account, using LS, as opposed to the regular Apache scheme that mixes all cached scripts in a single cache. Is this true? How can I do it?
  2. Similar to the previous question, can I enable/disable opcache per specific account?
  3. If I am indeed able to run independent caches, would each one have its own memory allocation and settings?
  4. Lastly, I would like to monitor them using a GUI such as github.com/PeeHaa/OpCacheGUI - I would have to run an instance of this GUI on each account, is that correct?
Many thanks
 

NiteWave

Administrator
#2
there are 3 php suExec mode in litespeed: Worker, Daemon, ProcessGroup.
by default litespeed php run in ProcessGroup mode. please refer
http://www.litespeedtech.com/products/litespeed-sapi/php/guide-to-suexec-setups
for more detail.

1. to be more accurate, apache only has Worker mode. which opcache is per php process. 2 continuous php requests from a same visitor may be assigned to 2 default php process at web server side, so opcache is in 2 php process and not shared at all. you can simply watch cache hit rete etc in a phpinfo page to know it. it's Daemon mode which mix all cached scripts in a single cache, but apache has no such mode(only Worker mode). ProcessGroup is what most users want: it has a parent lsphp process for each account, so opcache is isolated per an account, while all php requests to an account can share the opcache under same parent lsphp process

2. to diable/enable opcache, just set it in php,ini per account.

3. each account can have its own php.ini, so each has its specific settings. memory allocation is separate because of ProcessGroup nature.(Worker also isolated memory block, only Daemon share one single parent lsphp server wide so all accounts' opcache are managed under one process space.)

4. Yes. I think so.
 
Top