What is memcached?
Before we elaborate on this issue, we must first understand that it is "not what". Many people use it as a storage carrier of the same form as sharedmemory, although memcached uses the same "key=>value" to organize data, but it differs greatly from local caches such as shared memory and APC. The memcached is distributed, meaning it is not local. It is based on a network connection (and of course it can also use localhost) to complete the service itself, which is an application-independent program or daemon (daemon mode).
Memcached uses the Libevent library to implement network connectivity services, theoretically can handle an unlimited number of connections, but it is different from Apache, it is more time for stable continuous connection, so its actual concurrency capacity is limited. In a conservative case, the maximum number of simultaneous connections for memcached is 200, which is related to the Linux threading capability, which can be adjusted. Refer to the relevant documentation for Libevent. Memcached memory usage also differs from APC. APC is based on shared memory and Mmap, MEMCACHD has its own memory allocation algorithm and management mode, it is not related to shared memory, there is no shared memory limit, usually, each memcached process can manage 2GB of memory space, if more space is needed, You can increase the number of processes.
http://www.bkjia.com/PHPjc/486197.html www.bkjia.com true http://www.bkjia.com/PHPjc/486197.html techarticle memcached is the first thing we need to know before we explain this question is "not what." Many people use it as a storage carrier of the form of sharedmemory, although MEMCA ...