What is Memcached ?. Before explaining this question, we must first understand what Memcached is ". Many people regard it as a storage carrier in the form of SharedMemory.
What is Memcached?
Before explaining this question, we must first know what it is "not ". Many people use it as a storage carrier in the form of SharedMemory. although memcached uses the same "Key => Value" method to organize data, however, it is very different from local caches such as shared memory and APC. Memcached is distributed, that is, it is not local. It is based on network connections (of course, it can also use localhost) to complete the service. it is an application-independent program or Daemon process ).
Memcached uses the libevent library to implement network connection services. In theory, it can handle infinite connections, but unlike Apache, it is more stable and persistent connection oriented, therefore, its actual concurrency capability is limited. Under Conservative circumstances, the maximum number of simultaneous connections of memcached is 200, which is related to the Linux thread capability. this value can be adjusted. For more information about libevent, see related 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. generally, each memcached process can manage 2 GB of memory space. if you need more space, you can increase the number of processes.
Before explaining this issue, we must first understand what it is "not ". Many people use it as a storage carrier in the form of SharedMemory, although memca...