Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:php:opcode_cache [2016/06/17 18:50]
Jackson Zhang [Popular Opcode Caches]
litespeed_wiki:php:opcode_cache [2018/09/14 15:56]
Michael Alegre [Opcode caching limitations]
Line 10: Line 10:
  
   - **Opcode caching requires extra RAM.** The RAM limit you set for opcode caching will be automatically partitioned off. You will lose access to this RAM for other uses, so do not allow opcode caching to use too much of your RAM. For example, for a plesk user, normally 128M memory was allowed for that account. opcode cache should be set to 32M or lower. We did see out of memory error when opcode cache memory set to 64M.    - **Opcode caching requires extra RAM.** The RAM limit you set for opcode caching will be automatically partitioned off. You will lose access to this RAM for other uses, so do not allow opcode caching to use too much of your RAM. For example, for a plesk user, normally 128M memory was allowed for that account. opcode cache should be set to 32M or lower. We did see out of memory error when opcode cache memory set to 64M. 
-  - **Opcode caching requires PHP processes be forked from the same parent process in order to share the cache.** If the parent process is killed, the cache is flushed. This is why opcode caching does not work well with Apache'​s suPHP -- suPHP starts a new process for each PHP process, causing opcode cache to be flushed almost as soon as it was created. LiteSpeed'​s [[http://​www.litespeedtech.com/​products/​litespeed-sapi/​php/​suexec-daemon-mode|suEXEC ​Daemon mode]] and [[http://​www.litespeedtech.com/​products/​litespeed-sapi/​php/​suexec-processgroup|suEXEC ​ProcessGroup]] have been developed for greater use of opcode caching with PHP suEXEC while default ​suEXEC ​Worker mode does not. Please [[litespeed_wiki:​php:​enable_opcode_cache|make a change]] during opcode enabling process.+  - **Opcode caching requires PHP processes be forked from the same parent process in order to share the cache.** If the parent process is killed, the cache is flushed. This is why opcode caching does not work well with Apache'​s suPHP -- suPHP starts a new process for each PHP process, causing opcode cache to be flushed almost as soon as it was created. LiteSpeed'​s [[http://​www.litespeedtech.com/​products/​litespeed-sapi/​php/​suexec-daemon-mode|Daemon mode]] and [[http://​www.litespeedtech.com/​products/​litespeed-sapi/​php/​suexec-processgroup|ProcessGroup ​mode]] have been developed for greater use of opcode caching with PHP suEXEC while default Worker mode does not. Please [[litespeed_wiki:​php:​enable_opcode_cache|make a change]] during opcode enabling process.
   - **Opcode caches can be buggy.** Many users find that choosing an opcode cache is a matter of trial and error -- different opcode caches work better in different setups.   - **Opcode caches can be buggy.** Many users find that choosing an opcode cache is a matter of trial and error -- different opcode caches work better in different setups.
   - **Opcode caches can cause 503 errors.** This is an extension of the previous point. Opcodes caches are a frequent cause of 503 errors. Try turning off your opcode cache if you're getting 503 errors.   - **Opcode caches can cause 503 errors.** This is an extension of the previous point. Opcodes caches are a frequent cause of 503 errors. Try turning off your opcode cache if you're getting 503 errors.
Line 21: Line 21:
   * [[http://​xcache.lighttpd.net/​|xCache]] -- Actively maintained and supports most PHP versions upto 5.6 but not 7.0.  ​   * [[http://​xcache.lighttpd.net/​|xCache]] -- Actively maintained and supports most PHP versions upto 5.6 but not 7.0.  ​
   * [[http://​eaccelerator.net/​|eAccelerator]] -- Dead project. Supported PHP 5.4 and earlier.   * [[http://​eaccelerator.net/​|eAccelerator]] -- Dead project. Supported PHP 5.4 and earlier.
 +
 +How to enable opcode caches? Please check [[litespeed_wiki:​php:​enable_opcode_cache|here]].
  • Admin
  • Last modified: 2018/09/14 15:56
  • by Michael Alegre