In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge about "the difference and role of acceleration and cache extension in PHP". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
1、eAccelerator
eAccelerator is a free and open source PHP accelerator that optimizes and dynamically caches PHP scripts to improve cache performance, making PHP scripts almost completely eliminate server overhead in the compiled state. It also optimizes scripts to speed up their execution. PHP code execution efficiency can be increased by 1-10 times. eAccelerator is a PHP accelerator extension.
2、memcached
Memcached is a high-performance distributed in-memory object caching system for dynamic Web applications to reduce database load. It provides speed for dynamic, database-driven websites by caching data and objects in memory to reduce the number of database reads. From the text can be understood as: memory cache expansion, and for cluster servers used more, mainly for distributed cache, is a database cache.
Alternative PHP Cache(APC cache)
Alternative PHP Cache (APC cache) is an open source caching tool available for PHP that caches PHP intermediate code for Opcode(object file). APC cache is divided into two parts: system cache and user data cache. System cache is automatically used, which means APC caches the compiled results of PHP file source code, and then compares the time stamp when it is called again. If not, run with cached code. Default cache 3600s(one hour). But this still wastes a lot of CPU time. So you can set the system cache to never expire (apc.ttl=0) in php.ini. However, if this is set, you need to restart your web server (such as apache…) after shipping PHP code. At present, APC performance testing generally refers to this layer of cache; from the literal point of view: Alternative PHP Cache(APC cache) is also a memory cache extension, which is a database cache extension.
4、Xcache
Is an open source opcode cache/optimizer, it can improve PHP performance on the server, he avoids duplication of compilation process by buffering compiled PHP data into shared memory, can directly use the buffer compiled code to improve speed. Usually it can increase your page generation rate by 2 to 5 times and reduce server load. It is actually a PHP accelerator extension like eAccelerator.
The above is their role and difference, a simple point is: eAccelerator,xcache is PHP cache extension, memcached, APC cache is database cache extension, generally only one of them can be installed, do not be greedy. In addition, it is found that APC performance is inferior to Memcache when the Cache quantity exceeds a certain threshold. So in the choice of extensions, I generally choose the combination xcache+memcached.
"PHP acceleration, cache extension of the difference and role" of the content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.