Home  >  Article  >  Backend Development  >  What is Memcached in detail? _PHP Tutorial

What is Memcached in detail? _PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:40:26967browse

What is Memcached

Before elaborating on this issue, we must first understand what it "is not". Many people use it as a storage carrier like SharedMemory. Although memcached uses the same "Key=>Value" method to organize data, it is very different from local caches such as shared memory and APC. Memcached is distributed, which means it is not local. It completes the service based on network connection (of course it can also use localhost). It is an application-independent program or daemon process (Daemon mode).


Memcached uses the libevent library to implement network connection services. In theory, it can handle an unlimited number of connections, but it is different from Apache. It is more often oriented towards stable continuous connections, so its actual concurrency capability is There are restrictions. Under conservative circumstances, the maximum number of simultaneous connections for memcached is 200, which is related to the Linux thread capability. This value can be adjusted. For information about libevent, please refer to relevant documentation. Memcached memory usage is also different from APC. APC is based on shared memory and MMAP. Memcachd has its own memory allocation algorithm and management method. It has nothing to do with shared memory and has no restrictions on shared memory. Normally, each memcached process can manage 2GB of memory space. If If more space is needed, the number of processes can be increased.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486197.htmlTechArticleWhat is Memcached? Before elaborating on this issue, we must first be clear about what it "is not". Many people use it as a storage medium like SharedMemory, although memca...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn