opcode-cache

APC Hits/Misses and configuration

戏子无情 提交于 2019-12-05 09:04:21
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? Justin 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 miss, so you'll always expect some. You may need to tune how much memory you're dedicating to APC -

apc.filters by path?

不羁岁月 提交于 2019-12-04 21:53:15
问题 How would I use the apc.filters parameter in APC opcode caching to not cache certain paths? For example, I want caching to be active for anything under the path: "/var/www/vhosts" and exclude paths like "/usr/share/psa-horde/" I tried using apc.cache_by_default = 0 apc.filters = "+/var/www/vhosts" and apc.cache_by_default = 1 apc.filters = "-/usr/share/psa-horde/" But neither worked as I expected. http://www.php.net/manual/en/apc.configuration.php#ini.apc.filters Should the filter be

Basics of PHP opcode cache

偶尔善良 提交于 2019-12-03 20:46:21
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, but I just wanted to know whether using an opcode cache like APC would mean that PHP wouldn't even

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

a 夏天 提交于 2019-12-03 14:43:30
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 clogs? OOMs? I see large numbers for both of these in the XCache Admin page interface. In the Code

apc.filters by path?

谁都会走 提交于 2019-12-03 13:32:10
How would I use the apc.filters parameter in APC opcode caching to not cache certain paths? For example, I want caching to be active for anything under the path: "/var/www/vhosts" and exclude paths like "/usr/share/psa-horde/" I tried using apc.cache_by_default = 0 apc.filters = "+/var/www/vhosts" and apc.cache_by_default = 1 apc.filters = "-/usr/share/psa-horde/" But neither worked as I expected. http://www.php.net/manual/en/apc.configuration.php#ini.apc.filters Should the filter be something more like "+/var/www/vhosts/*" (note the wildcard)? I'm afraid this isn't possible because of the way

Optimize APC Caching

…衆ロ難τιáo~ 提交于 2019-12-03 02:02:51
问题 here is a link to how my APC is running : [removed] As you can see, it fills up pretty quickly and my Cache Full Count goes over 1000 sometimes My website uses Wordpress. I notice that every time I make a new post or edit a post, 2 things happen. 1) APC Memory "USED" resets 2) I get a whole lot of Fragments I've tried giving more Memory to APC (512 mb) but then it crashes sometimes, it seems 384 is best. I also have a Cron job that restarts apache, clearing all APC of fragments and used

Optimize APC Caching

吃可爱长大的小学妹 提交于 2019-12-02 17:11:29
here is a link to how my APC is running : [removed] As you can see, it fills up pretty quickly and my Cache Full Count goes over 1000 sometimes My website uses Wordpress. I notice that every time I make a new post or edit a post, 2 things happen. 1) APC Memory "USED" resets 2) I get a whole lot of Fragments I've tried giving more Memory to APC (512 mb) but then it crashes sometimes, it seems 384 is best. I also have a Cron job that restarts apache, clearing all APC of fragments and used memory, every 4 hours. Again, my apache crashes if APC is running for a long period of time, I think due to

What are the advantages/disadvantages of monolithic PHP coding versus small specialized php scripts?

ぐ巨炮叔叔 提交于 2019-12-02 13:27:01
问题 I have historically used a monolithic approach to PHP coding. That is, I write one index.php, with an average size of 70k-250k, and use mod_rewrite to turn the rest of the REQUEST_URI into parameters passed into the index.php to control what is happening. The alternative would be to write many small php scripts, each specialized to a particular purpose. I'm thinking that some of my more active ajax scripts may benefit from this. One thing that has kept me in this thought process is I don't

Do PHP opcode cache work with __autoload?

烈酒焚心 提交于 2019-11-27 15:30:49
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? Pascal MARTIN (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 file and compile it to opcodes ; and store opcodes in cache. The important point, here, is the

PHP5 Frameworks: Autoloading and Opcode Caching

拈花ヽ惹草 提交于 2019-11-27 05:57:26
问题 A number of frameworks utilize spl_autoload_register() for dynamically loading classes (i.e. controllers and models). There are a couple of posts on the issue of autoloading and opcode caching. One post in particular has a response by @cletus which references @Rasmus making a number of statements which prove to be unsavoury for those utilizing APC as an opcode cache: Do PHP opcode cache work with __autoload? There does not appear to be any discussion as to any possible alternatives to