opcode-cache

Is APC opcode cache shared between PHP-FPM pools/workers?

吃可爱长大的小学妹 提交于 2021-02-06 08:45:56
问题 Internet has a lot of discussions that calling apc_cache_clear() in CLI does not clear opcode caches from "web" PHP processes, whether they are run inside Apache or by FPM (see How to clear APC cache entries? ). As a suggested solution, it's possible to create a simple PHP page that calls apc_cache_clear() , and call that from CLI. Symfony's ApcBundle does that. If the apc_cache_clear() from CLI does not empty the cache from Apache/FPM, does it between FPM workers? If I call /clear_apc_cache

Do PHP opcode cache work with __autoload?

て烟熏妆下的殇ゞ 提交于 2019-12-28 04:23:06
问题 Sorry if this is basic, I am trying to learn as much as I can about OO in PHP and I am slowly learning how to use it (very limited). So I am wanting to know if __autoload() has any affect on PHP opcode cache's? 回答1: (Disclaimer : I only know APC) What an opcode cache do is : when a file is included/required, it take the full path to that file check if the opcodes corresponding to that file are already in RAM (in opcode cache) if yes, return those opcode so they are executed if no, load the

apc vs eaccelerator vs xcache

别来无恙 提交于 2019-12-27 16:35:08
问题 Im doing research on which one of these to use and I can't really find one that stands out. Eaccelerator is faster than APC, but APC is better maintained. Xcache is faster but the others have easier syntax. Anyone have recommendations on which to use and why? 回答1: APC is going to be included in PHP 6, and I'd guess it has been chosen for good reason :) It's fairly easy to install and certainly speeds things up. 回答2: Check out benchmarks and comparisons: here and here and there 回答3: APC

apc vs eaccelerator vs xcache

旧街凉风 提交于 2019-12-27 16:33:08
问题 Im doing research on which one of these to use and I can't really find one that stands out. Eaccelerator is faster than APC, but APC is better maintained. Xcache is faster but the others have easier syntax. Anyone have recommendations on which to use and why? 回答1: APC is going to be included in PHP 6, and I'd guess it has been chosen for good reason :) It's fairly easy to install and certainly speeds things up. 回答2: Check out benchmarks and comparisons: here and here and there 回答3: APC

xcache how does it work? code coverage? clogs? OOMs?

一曲冷凌霜 提交于 2019-12-13 11:45:55
问题 I've searched all over the web for documentation including on the XCache website. I'm new to PHP opcode caching and XCache. I'd like an explanation of how XCache works. I know that it stores compiled php code so that it doesn't need to be recompiled everytime. But how does XCache know when php code has been updated and thus the cache is out of date? How do I know if I need to clear the cache? Does XCache compile and cache all php code on the server? If so can this be configured? What are

Why PHP APC cache miss in increasing all the time

◇◆丶佛笑我妖孽 提交于 2019-12-12 16:27:59
问题 I am using apc.php to check the PHP APC's stats (http://svn.php.net/viewvc/pecl/apc/trunk/apc.php) I have the following stats on a fairly busy server Cached Files 317 ( 26.3 MBytes) Hits 51483 Misses 6814 The problem is the Misses is always increasing (given a limited number of files), are there any way to check which files are missed? Another question is: The Cached Files is total consuming 26.3MBytes, does it mean every Apache child process is using 26.3MBytes? 回答1: You do know what apc

mod_fcgid with php opcode caching

北战南征 提交于 2019-12-12 05:48:55
问题 I have been using apache web server with mpm-worker and mod_fcgid. I have read about mod_fcgid that it can not make use of opcode caching. http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/ apc cache module seems to be enabled in my php configuration. I am not sure if my spawned php codes are never shared. Should I remove APC? Does it have any overhead? 回答1: I am not sure if my spawned php codes are never shared. You might find this question helpful. Should I remove APC?

Python doesn't have opcode cacher?

怎甘沉沦 提交于 2019-12-10 11:41:07
问题 I'm currently using PHP. I plan to start using Django for some of my next project. But I don't have any experience with Python. After some searching, I still can't find a Python opcode cacher. (There are lots of opcode cacher for PHP: APC, eAccelerator, Xcache, ...) 回答1: It's automatic in Python -- a compiled .pyc file will appear magically. 回答2: Python doesn't need one the same way PHP needs it. Python doesn't throw the bytecode away after execution, it keeps it around (as .pyc files). 回答3:

Basics of PHP opcode cache

无人久伴 提交于 2019-12-09 13:49:04
问题 Currently on a very large project that I do not plan to re-use for another site, I have the site's name hardcoded into the files everywhere. Now, if I were ever to change the site name it would take a lot of effort to change that everywhere. I know the obvious solution is to just store the name as a variable or a constant, but I guess you could call it my micro-optimizing way of thinking: I always figured it would be one less thing PHP has to parse. I do realize it won't make much difference,

APC Hits/Misses and configuration

守給你的承諾、 提交于 2019-12-07 04:56:11
问题 What are "Hits & Misses" in reference to APC opcode caching? I've installed APC and it's running great, but I've got "some" misses and I'm wondering if that's "bad". Also, I am running Openx and, as such, am filling up the "Cache full count(s)" pretty quickly. What do I need to change in the configuration to minimize that? Any recommended configurations? 回答1: Some misses are to be expected. Hits = things are in cache Miss = things not (yet) in cache. New or less-used things will always be a