MemCache memory cache notes

Source: Internet
Author: User
I. Introduction to Memcache: Memcache is a high-performance distributed memory object cache system. Maintain a large HashTable in the memory. Memcached manages this huge HashTable. Ii. Differences between Memcache and Memcached: Memcache is the software name, And Memcached is the name of the started process.

I. Introduction to Memcache: Memcache is a high-performance distributed memory object cache system. Maintain a large HashTable in the memory. Memcached manages this huge HashTable. Ii. Differences between Memcache and Memcached: Memcache is the software name, And Memcached is the name of the started process.

1. Introduction to Memcache

Memcache (memory, cache): a high-performance distributed memory object cache system. Maintain a large HashTable in the memory. Memcached manages this huge HashTable.

Ii. Differences between Memcache and Memcached
Memcache is the software name and Memcached is the name of the started process.

Iii. Working Principle of Memcache
Memcached runs on one or more servers as a daemon and receives client connections and operations at any time.
When memcache is not installed, the website works as follows: the browser accesses the server script, the server script accesses the database, and the processing is then output to the browser.
If your server is installed with memcache, after the first database query is executed, the server script stores the result set in the memcached memory cache, in the future, you can directly request from the memcached memory cache instead of querying the database, which greatly improves the efficiency.

4. Install the Memcache Server

wget http://memcached.googlecode.com/files/memcached-1.4.15.tar.gztar -zxvf memcached-1.4.15.tar.gzcd memcached-1.4.15.tar.gz./configureMake && make install

5. Basic settings for Memcached server startup
For example, Memcahced-d-m 128-l 192.168.1.111-p 11211-u root
Below is a description of some Memcahced Parameters
-P memcached listening TCP port
-L connected IP address. The default value is local
-D run in daemon mode and put the program into the background
-U runs as the identity (only valid when running as root)
-MB maximum memory usage, in MB. The default value is 64 MB. The maximum value is 2 GB.
-An error is returned when M memory is used up, instead of deleting items.
-C: Maximum number of simultaneous connections. The default value is 1024.
-F block size growth factor, default value: 1.25
-N: minimum allocation space. The default value of key + value + flags is 48.
-H Show Help

Original article address: MemCache memory cache notes. Thank you for sharing them.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.