Questions tagged [opcode-cache]

An opcode cache is a system to cache the result of the PHP code compilation to bytecode. This allows to use the bytecode instead of compiling on every request. Different opcode cache systems are available, mostly depending on used PHP version.

32 questions
105
votes
12 answers

apc vs eaccelerator vs xcache

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…
Galen
  • 29,976
  • 9
  • 71
  • 89
18
votes
3 answers

Optimize APC Caching

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.…
GreatestSwordsman
  • 1,175
  • 5
  • 20
  • 39
15
votes
3 answers

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

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…
Ville Mattila
  • 1,343
  • 3
  • 15
  • 28
13
votes
2 answers

Do PHP opcode cache work with __autoload?

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?
JasonDavis
  • 48,204
  • 100
  • 318
  • 537
10
votes
1 answer

PHP5 Frameworks: Autoloading and Opcode Caching

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…
Corey Ballou
  • 42,389
  • 8
  • 62
  • 75
8
votes
3 answers

Is there a way to measure parse time in PHP?

Optimization of PHP code via runtime benchmarking is straight forward. Keep track of $start and $end times via microtime() around a code block - I am not looking for an answer that involves microtime() usage. What I would like to do is measure the…
jschrab
  • 11,035
  • 4
  • 20
  • 17
7
votes
5 answers

apc.filters by path?

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…
typeoneerror
  • 55,990
  • 32
  • 132
  • 223
6
votes
1 answer

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

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…
Leo
  • 69
  • 1
  • 3
5
votes
1 answer

APC Hits/Misses and configuration

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)"…
typeoneerror
  • 55,990
  • 32
  • 132
  • 223
4
votes
3 answers

Which one would you choose ; XCache or APC?

I need a opcode-cache in my project. Also i will use for the datastore (mysql returned row) cache ? Which is the best for you and WHY ?
O..
  • 10,925
  • 5
  • 20
  • 8
3
votes
4 answers

Configuring APC with Drupal

I am working on a website which is hosted on a VPS with CENTOS 5.4 i686 virtuozzo installed. I have a drupal installation on the server which gets around 100s of authenticated users at the same time.But at a certain point of time the server stopped…
niting
  • 2,384
  • 3
  • 19
  • 20
3
votes
2 answers

Basics of PHP opcode cache

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…
JasonDavis
  • 48,204
  • 100
  • 318
  • 537
3
votes
1 answer

PHP performance (Opcode caching / function volatility)

BACKSTORY I maintain a spectrum of (web-)applications that all use a large homegrown PHP library. Some of these applications are traditional desktop applications that are used by employees, but others (which are also more relevant to this question),…
Staex
  • 31
  • 1
  • 1
3
votes
2 answers

Should I use FastCGI or SuPHP for my VPS?

I have a VPS running Centos and a Cpanel installation. 2 GB RAM. It currently runs Apache 1.3.42. I could also use 2.0.64 or 2.2.22, should I upgrade? PHP (5.3) runs as SuPHP. I'm wondering if I should stick with the current setup? Or should I…
Aaron Kreider
  • 1,705
  • 5
  • 22
  • 44
3
votes
3 answers

PHP APC - Why is loading cached array op codes slow?

I'm using APC to reduce my loading time for my PHP files. My files load very fast, except for one file where I define more than 100 arrays. This 270 kb file takes 200 ms to load. The rest of the files are full of objects, methods, and…
Aaron Kreider
  • 1,705
  • 5
  • 22
  • 44
1
2 3