diff --git a/reference/apc/ini.xml b/reference/apc/ini.xml index 9b9720b3f6..bb314b9d68 100644 --- a/reference/apc/ini.xml +++ b/reference/apc/ini.xml @@ -1,5 +1,5 @@ - +
&reftitle.runtime; &extension.runtime; @@ -7,6 +7,30 @@ Although the default APC settings are fine for many installations, serious users should consider tuning the following parameters. + + There are two main decisions you have to make. First, how much shared + memory do you want to set aside for APC, and second, whether you want APC + to check if a file has been modified on every request. The two ini + directives involved here are apc.shm_size and + apc.stat. Read the sections on these two directives + carefully below. + + + Once you have a running server, you should copy the + apc.php script that comes with the extension to + somewhere in your docroot and load it up in your browser. It provides + you with a detailed look at what is happening in your cache. If you + have GD enabled in PHP, it will even have pretty graphs. First thing + to check is of course that it is actually caching files. Assuming it is + working you should then pay close attention to the Cache full + count number on the left. That tells you the number of times + the cache has filled up and has had to forcefully clean up any entries + not accessed within the last apc.ttl seconds. You + should configure your cache to minimize this number. If you are constantly + filling your cache, the resulting cache churn is going to hurt performance. + You should either set more memory aside for APC, or use + apc.filters to cache fewer scripts. + APC configuration options @@ -98,6 +122,18 @@ PHP_INI_SYSTEM> APC 3.0.6 + + apc.max_file_size + "1M" + PHP_INI_SYSTEM + > APC 3.0.6 + + + apc.stat + "1" + PHP_INI_SYSTEM + > APC 3.0.9 +
@@ -337,6 +373,43 @@
+ + + apc.max_file_size + integer + + + + Prevent files larger than this value from getting cached. Defaults to + 1M. + + + + + + apc.stat + integer + + + + Be careful if you change this setting. The default is for this to be On + which means that APC will stat (check) the script on each request to see + if it has been modified. If it has been modified it will recompile and + cache the new version. If you turn this setting off, it will not check. + That means that in order to have changes become active you need to + restart your web server. On a production server where you rarely + change the code, turning stats off can produce a significant performance + boost. + + + For included/required files this option applies as well, but note that + if you are using relative path includes (any path that doesn't start + with / on Unix) APC has to check in order to uniquely identify the file. + If you use absolute path includes APC can skip the stat and use that + absolute path as the unique identifier for the file. + + +
diff --git a/reference/apc/reference.xml b/reference/apc/reference.xml index 51a9425385..6cc02f0e89 100644 --- a/reference/apc/reference.xml +++ b/reference/apc/reference.xml @@ -1,5 +1,5 @@ - + @@ -31,13 +31,16 @@ - On Windows, APC expects c:\tmp to exist, and be - writable by the web server. + On Windows, APC needs a temp path to exist, and be + writable by the web server. It checks TMP, TEMP, + USERPROFILE environment variables in that order + and finally tries the WINDOWS directory if none of + those are set. - For more in-depth, highly technical documentation, see the + For more in-depth, highly technical implementation details, see the developer-supplied TECHNOTES file .