Php apc Configuration

Source: Internet
Author: User
Tags apc apc configuration
It mainly accelerates PHP www. **. COM/info. enabledwww when PHP displays the APC status. **. COM/APC. PHP shows that user cache does not work. Use version 3.0.15 to solve the problem: http://pecl.php.net/package/apcdecompress and install/usr/local/PHP/bin/phpize. /configure -- enable-APC-MMAP -- With-PHP-Config =/usr/local/PHP/bin/PHP-configmakemake installcp/usr/local/PHP/lib /PHP/extension/ no-debug-zts-20060613/APC. so/usr/local/PHP/lib/PHP/extensions/APC. sochmod 755/usr/local/PHP/lib/PHP/extensions/APC. so Configure/etc/PHP. add extension = APC to the end of ini. soapc. enabled = 1apc. cache_by_default = onapc. shm_segments = 1apc. shm_size = 32apc. TTL = 600apc. user_ttl = 600apc. num_files_hint = 0apc. write_lock = on restart Apache performance is improved but not equal to Zeus level still need to be improved from: http://www.chinaz.com/Program/PHP/0Z615J22007.html
APC. cache_by_default = on indicates whether to enable caching for all files by default. If it is set to off and used together with the APC. Filters command starting with the plus sign, the file is cached only when the filter is matched.
APC. Enabled = on whether to enable APC. If APC is statically compiled into PHP and you want to disable it, this is the only way.
 
PC. Filters = a list of POSIX extension Regular Expressions separated by commas. If the source file name matches any mode, the file is not cached. Note that the file name used for matching is the file name passed to include/require, rather than the absolute path. If the first character of the regular expression is "+", it means that any file that matches the expression will be cached. If the first character is "-", no match will be cached. "-" Is the default value, which can be omitted.
APC. TTL = 0 the number of seconds that cache entries can stay in the buffer. 0 indicates never timeout. Recommended Value: 7200 ~ 36000. If it is set to 0, the buffer may be filled with old cache entries, resulting in the inability to cache new entries.
APC. user_ttl = 0 is similar to APC. TTL. The recommended value is 7200 ~ for each user ~ 36000.
APC. gc_ttl = 3600 the number of seconds that cache entries can exist in the garbage collection table. This value provides a security measure, even if a server process crashes while executing the cached source file. country. the webmaster station and the source file have been modified, and the memory allocated for the old version will not be recycled until the TTL value is reached. Setting 0 disables this feature.
PC. max_file_size = 1 MB prohibit files larger than this size from being cached.
APC. num_files_hint = approximate number of different source files that may be contained or requested on the 1000web server (Recommended Value: 1024 ~ 4096 ). If you are not sure, set it to 0. This setting is mainly used for websites with thousands of source files.
 
APC. shm_segments = 1 indicates the number of shared memory blocks allocated to the compiler buffer (Recommended Value: 1 ). If APC consumes shared memory and the APC. shm_size command is set to the maximum value allowed by the system, you can increase the value.
APC. shm_size = 30 size of each shared memory block (in MB, recommended value: 128 ~ 256 ). Some systems (including most BSD variants) have very few default shared memory blocks.
APC. write_lock = on whether to enable the write lock. On a very busy server, whether it is to start the service or modify files, it is possible that multiple processes attempt to cache a file at the same time, resulting in the competition condition to enable this command to avoid the emergence of competition conditions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.