When a users browser calls a PHP script, the process is as follows.
1.Users browser request the page
2.PHP script gets compiled by server
3.Execution of the compiled version
4.Output data.
Normally the applications such as programs on our desktop are already compiled. But this is not in the case of scripting languages such as PHP,Perl etc. They are compiled only on demand. Converting source code to machine code consumes a lot of resources. Opcode cache stores the opcode in a cache. Thus instead of constantly recompiling the source code it execute the opcode cache. So there is need for PHP script gets compiled by server and this speeds up the site.
There are many opcode cache such as Xcache,APC,Zend Optimizer etc. They work by storing the byte-code of interpreted php in shared memory. PHP accelerators speed up the php exeution by lazily compiling PHP and storing the generated opcode in shared memory.
APC stands for Alternative PHP cache and it is free and open. APC is opcode cache type,and it caches both user variables and PHP code. So it minimizes overall server load and memory usage.
How it improves performance of the applications?
APC utilizes shared memory for caching purposes. APC also provides a user cache for storing application data. In APC opcode cache technique the system checks data availability in the cache for every new data request. If the data is not available it executes and stores in the cache for future reference. Arrays,objects and functions can be cached using APC.
Configuration is an important factor in APC. Whenever PHP scripts is added it needs to be reconfigured. APC statistics can be viewed through browser by running apc.php script placed in web directory. Data capacity should be minimized in a well configured cache. APC uses cache size as 32Mb by default. So APC works well for caching page of site which does not change often.
When APC is build with SHM(Shared Memory) it support multiple memory segment. If it is built with memory mapping it will use only one memory segment. If APC cache is well configured it significantly improves speed of application. APC opcode cache provides the ability to cache data as well. Other options like memcache only allow for caching data.APC also allows direct access to cache in memory. But in the case of Mem cache application access it through TCP.
If you require help, contact SupportPRO Server Admin


