Use Zend Opcache to accelerate PHP. zendopcache
Optimizer is a closed-source but free-to-use PHP optimization acceleration component developed by Zend. It is the first and fastest opcode caching tool. . Now, Zend Technologies has open sourced Optimizer as Zend Opcache under the PHP License.
Zend OPcache provides faster PHP execution through opcode caching and optimization. It stores precompiled script files in shared memory for later use, thus avoiding the time consumption of reading code from disk and compiling it. At the same time, it also applies some code optimization modes to make the code execute faster.
1. What is opcode cache?
When the interpreter completes the analysis of the script code, it generates intermediate code that can be run directly, also known as opcode (Operate Code, opcode). The purpose of Opcode cache is to avoid repeated compilation and reduce CPU and memory overhead. If the performance bottleneck of dynamic content lies not in CPU and memory, but in I/O operations, such as the disk I/O overhead caused by database queries, then the performance improvement of opcode cache is very limited. But since opcode cache can reduce CPU and memory overhead, this is always a good thing - in an environmentally friendly manner, consumption should be reduced as much as possible, right? :D
Modern opcode caches (Optimizer, APC2.0, others) use shared memory for storage and can execute files directly from them without having to "deserialize" the code before execution. This results in significant performance speedups, often lower overall server memory consumption, and few downsides.
2. Comparison of the advantages and disadvantages of Optimizer and APC
Optimizer was renamed Opcache in mid-March 2013.
According to discussions on the PHP wiki, Zend Opcache is about to be integrated into php 5.5. As a competitor of APC, the new Zend Opcache is likely to replace APC's position, although OptimizerPlus does not have a user cache function like APC.
Advantages of OPTIMIZER over APC
Advantages of APC over OPTIMIZER
3. Use Zend Opcode
It is now possible to use Zend Opcache instead of APC as a PHP optimization acceleration tool. The current Zend Opcode is compatible with PHP 5.2.*, 5.3.*, 5.4.* and PHP-5.5 development version. However, support for PHP 5.2 will be removed in the future.
Note: Zend Opcache conflicts with eaccelerator. To install Zend Opcache, you may need to uninstall eaccelerator first - if you use this acceleration module.
Install and configure from source
The source code of Zend Opcache is hosted on github, and it is still called ZendOptimizerPlus.
For detailed installation steps, please refer to its README file.
Note:
By the way, php-devel is required when compiling and installing from source code. It is used at the beginning of the quick installation section in README,
$PHP_DIR/bin/phpize
If you don’t know the path of phpize, you can,
whereis phpize
There are also corresponding recommended optimization settings in the README file.
Install and configure from EPEL source
I don’t like to compile and install programs from source code. One is because of my limited skills, and the other is because I am afraid of trouble. The following describes how to install Zend Opcache from the EPEL installation source, taking the operation on CentOS as an example, based on the configuration of my VPS.
The EPEL community has provided an installation package for Zend Opcache, which can be installed directly using yum. Of course, the premise is that the EPEL installation source has been configured and used. If not, you can refer here.
As a reminder, the PHP on the REMI installation source is already version 5.4. Since some people have tested that WordPress performs better on PHP 5.4 than on PHP 5.3 (10% faster and lower ram consuming), it’s not a bad thing to upgrade PHP by the way.
Operation steps:
Check to see if it started correctly:
php -v
The output is similar to:
PHP 5.4.14 (cli) (built: Apr 11 2013 11:04:35) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with Zend OPcache v7.0.1, Copyright (c) 1999-2013, by Zend Technologies<br /><br /><br /><span><strong><span>原文转载于:http://cnzhx.net/blog/zendopcache-accelerate-php</span></strong>/ 感谢原著</span>

如何在Zend框架中使用ACL(AccessControlList)进行权限控制导言:在一个Web应用程序中,权限控制是至关重要的一项功能。它可以确保用户只能访问其有权访问的页面和功能,并防止未经授权的访问。Zend框架提供了一种方便的方法来实现权限控制,即使用ACL(AccessControlList)组件。本文将介绍如何在Zend框架中使用ACL

PHP实现框架:ZendFramework入门教程ZendFramework是PHP开发的一种开源网站框架,目前由ZendTechnologies维护,ZendFramework采用了MVC设计模式,提供了一系列可重用的代码库,服务于实现Web2.0应用程序和Web服务。ZendFramework深受PHP开发者的欢迎和推崇,拥有广泛

PHP无法识别ZendOptimizer,如何解决?在PHP开发中,有时可能会遇到PHP无法识别ZendOptimizer的情况,这会导致部分PHP代码无法正常运行。在这种情况下,我们需要采取一些措施来解决这个问题。下面将介绍一些可能的解决方法,并附上具体的代码示例。1.确认ZendOptimizer是否正确安装:首先,我们需要确认ZendOptimize

Windows2003安装包中包含了Zend,PHP5.2.17,PHPWind8.7和PHPMyadmin3.5.2,您可以直接下载安装包,节约搜索资源的时间。 但是,由于MySQL超出了上传限制,您需要另行前往MySQL官网下载。然后解压拷贝到D盘,如下图: MySQLinDdisk 安装与配置WindowsIIS+FTP 单击开始>控制面板>添加或删除程序。 AddingordeletingaPG 单击添加/删除Windows组件(A)。 Addingorde

随着信息技术的飞速发展,越来越多的企业开始意识到信息化管理的必要性。ERP(企业资源计划)管理平台是现代企业管理的重要工具,可以帮助企业实现资源的规划、协同、控制、优化和管理。其中,PHP框架Zend作为一款优秀的开发工具,可以帮助开发者快速高效地实现ERP系统的开发。本文将介绍如何使用Zend开发一个高效的ERP管理平台。一、确定需求分析在开始开发过程之前

随着互联网应用的不断发展,大型应用的开发需求也不断增加。在这样的背景下,选择适合自己的开发框架显得尤为重要。Laravel和Zend是两个广泛使用的PHP框架,他们各有优势,但哪一个更适合开发大型应用呢?Laravel是一个广受欢迎的开发框架,已经成为PHP开发人员的首选框架之一。它采用了现代化的设计理念,内置多种强大的功能和工具,例如EloquentOR

PHP是一种广泛使用的动态Web编程语言。开发者可以利用不同的框架来简化其Web开发工作。Symfony和ZendFramework是PHP中最受欢迎的两个框架之一。在Symfony3和ZendFramework3之间进行选择时,初学者经常会困惑。这里我们将比较这两个框架,看看哪个更容易上手。Symfony3Symfony是一个基于MVC模式的PH

随着互联网信息的爆炸式增长,搜索引擎已经成为人们获取信息的首选方式之一。而现在,随着网站数量的不断增加,搜索引擎的快速响应和准确性变得越来越重要,而这就要求搜索引擎必须具备高性能。在这篇文章中,我将介绍如何使用PHP框架Zend来开发一个高性能的搜索引擎。一、为什么使用Zend框架Zend框架是一个高性能的PHP框架,它在性能和可扩展性方面都有非常出色的表现


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Dreamweaver CS6
Visual web development tools

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.