memcached configuration (beginner) and testing

Source: Internet
Author: User

First, memcached installation memcached Dependency$ sudo apt-get install Libevent-dev Installing the memcached service$ sudo apt-get install memcached Second, start before starting$ FREE to view idle memory main concern is the third row,-/+ Buffers/cache in the corresponding memory, is the application can see the size of the available memory. Total idle memory = True idle memory + fast-recovering memory buffers+ Memory Cached http://linuxtools-rst.readthedocs.org/zh_CN/latest/tool/ Free.html from the operating system perspective: Cache for read operations, buffer for write operations Start$ memcached-d-M 64-p 11211 View Help$ memcached-h Common Commands-D daemon-m setting memcached maximum available memory-p setting port, default 11211-u setting user-L setting listener host, 127.0.0.1 only native access, 0.0.0.0 full domain access-T set the number of threads, default to 4-c to maintain maximum number of connections, The default 10,241 hosts can serve memcached on multiple ports, and these memcached belong to different processes. Test Memcache Service with Telnettelnet localhost {port_number} with NCNC localhost {port_number} with Python-memcachesudo apt-get install Pyhton-memcache >>>import memcache>>>mc=memcache. Clinet ([' 127.0.0.1:11212 ']) >>>mc.set (' key_1 ', ' value_1 ') true>>>mc.get (' key_1 ') ' Value_1 ' View status (Telnet, NC)Stats focuses on the maximum amount of memory that limit_maxbytes:memcached can use bytes: The amount of memory used by the current memcached evictions: The number of items kicked off by LRU Curr_items Current number of items Total_items total number of items see current Use memory Usage bytes limits_maxbytes ratio total_items Stats items Quit Quit check version number ========link some parameters: http://www.cnblogs.com/suger/archive/2011/09/06/2168319.html official documentation: https:// Github.com/memcached/memcached/blob/master/doc/protocol.txt

memcached configuration (beginner) and testing

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.