Comparison and feeling between APC and APCu in PHP5.4.36

Source: Internet
Author: User
Tags apc apc configuration apcu vc runtime

Comparison and feeling between APC and APCu in PHP5.4.36

APC stands for Alternative PHP Cache. Optional php Cache, including opcache and user variable Cache.

APCu only contains the user variable cache.

Recently, the server php was upgraded from 5.2.17 to 5.4.36, and apache was upgraded from 2.2.22 to 2.4.10. memcache, apc, and zend optimization extensions were used in the previous Code. Therefore, I want to migrate the entire set to the new environment. After a period of experimentation, php ts 5.4 was used, mainly for ISAPI installation instead of FASTCGI. The reason is described below.

Need to download and install vc Runtime Library, version is VC9, http://www.microsoft.com/downloads/zh-cn/details.aspx? Displaylang = zh-cn & FamilyID = 9b2da534-3e03-4391-8a4d-074b9f2bc1bf

VC12 is vc2013, and VC11 is Vc2012.

Memcache logic is no problem, http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/ this address to download the latest windows memcache, php5.3, php 5.4, php 5.5, php 5.6 have a corresponding package, 5.2 The package corresponding to the package has been canceled.

Apc encountered a new problem, the latest APC http://windows.php.net/downloads/pecl/releases/apc/3.1.13/ has canceled the 5.2 support, cut has not updated version for more than a year, it seems that the future of the php support for the high version will become a problem, therefore, we need to find new solutions.

Later found that many people in 5.4 use this http://windows.php.net/downloads/pecl/releases/apcu/4.0.7/, is said to be the official new recommendations, but confirmed only user caching, only support user cache, management tool apc. php has also changed. Configuration is much easier than APC configuration.

Again, zend optimization also removes 5.2 or more support. The latest zend guard only supports php of the ETS version and can only use the fastcgi mode, and supports php of Version 5.3 or above, the 5.2 support is also canceled. I want to use the ts version of php because zend guard seems to be purely intended to decode the new encryption code during the trial. Worker Process. Therefore, to solve the problem, we used the new recommended opcache extension, which is also officially supported by php5.3, php5.4, and php5.5. This is pure opcache. Address http://windows.php.net/downloads/pecl/releases/opcache/7.0.4/

Need to be configured in php. ini

[Opcache]
Zend_extension = d:/wamp/php/ext/php_opcache.dll
Opcache. enable = 1
Opcache. memory_consumption = 128
Opcache. interned_strings_buffer = 8
Opcache. max_accelerated_files = 4000
Opcache. revalidate_freq = 60
Opcache. fast_shutdown = 1
Opcache. enable_cli = 1

APCu is automatically configured by default (via apc. php ):

Runtime Settings
Apc. coredump_unmap 0
Apc. enable_cli 0
Apc. enabled 1
Apc. entries_hint 4096
Apc. gc_ttl 3600.
Apc. preload_path
Apc. rfc1867 0
Apc. rfc1867_freq 0
Apc. rfc1867_name APC_UPLOAD_PROGRESS
Apc. rfc1867_prefix upload _
Apc. rfc1867_ttl 3600
Apc. serializer php
Apc. shm_segments 1
Apc. shm_size 32 M
Apc. slam_defense 1
Apc. smart 0
Apc. ttl 0
Apc. use_request_time 1
Apc. writable/tmp

APC runtime settings (view through apc. php)

[Apc]
Apc. enabled = on
Apc. shm_segments = 1
Apc. shm_size = 16 M
Apc. user_entries_hint = 0
Apc. user_ttl = 0
Apc. cache_by_default = off
Apc. enable_cli = off
Apc. ttl = 0
Apc. gc_ttl = 3600
Apc. max_file_size = 1 m
; Apc. mmap_file_mask =
Apc. num_files_hint = 0
Apc. optimization = 0
Apc. report_autofilter = off
Apc. stat = off
Apc. write_lock = off
Apc. rfc1867 = off
Apc. canonicalize = 0
Apc. use_request_time = 0
Apc. filters = ""
Apc. slam_defense = off

Runtime Settings
Apc. cache_by_default
Apc. canonicalize 0
Apc. coredump_unmap 0
Apc. enable_cli
Apc. enabled 1
Apc. file_md5 0
Apc. file_update_protection 2
Apc. filters
Apc. gc_ttl 3600.
Apc. include_once_override 0
Apc. lazy_classes 0
Apc. lazy_functions 0
Apc. max_file_size 1 m
Apc. num_files_hint 0
Apc. preload_path
Apc. report_autofilter
Apc. rfc1867
Apc. rfc1867_freq 0
Apc. rfc1867_name APC_UPLOAD_PROGRESS
Apc. rfc1867_prefix upload _
Apc. rfc1867_ttl 3600
Apc. serializer default
Apc. shm_segments 1
Apc. shm_size 16 M
Apc. shm_strings_buffer 4 M
Apc. slam_defense
Apc. stat
Apc. stat_ctime 0
Apc. ttl 0
Apc. use_request_time 0
Apc. user_entries_hint 0
Apc. user_ttl 0
Apc. write_lock

Install LNMP in CentOS 6.3 (PHP 5.4, MyySQL5.6)

Nginx startup failure occurs during LNMP deployment.

Ubuntu install Nginx php5-fpm MySQL (LNMP environment setup)

Detailed php hd scanning PDF + CD source code + full set of teaching videos

Configure the php lnmp development environment in CentOS 6

PHP details: click here
PHP: click here

This article permanently updates the link address:

Related Article

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.