Install and configure memcached in Windows platform sharing _ server other

Source: Internet
Author: User
Tags memcached memory usage win32

Memcached is a high-performance distributed memory object caching system for dynamic Web applications to reduce database load. It reduces the number of read databases by caching data and objects in memory, providing the speed of dynamic, database-driven Web sites. Memcached is based on a hashmap that stores key/value pairs. Its daemon (daemon) is written in C, but the client can write in any language and communicate with the daemon through the memcached protocol. However, it does not provide redundancy (for example, copying its hashmap entries), and when a server s stops running or crashes, all key/value pairs placed on s will be lost.

Memcached was developed by Danga Interactive, and its latest version was published in 2010, with the authors Anatoly Vorobey and Brad Fitzpatrick. Used to promote LiveJournal. COM access speed. LJ's dynamic page hits thousands of times per second, user 7 million. Memcached reduces database load significantly, allocates resources better, and accesses more quickly.


First, download memercached for Windows

Download Address: http://www.jb51.net/softs/44843.html



Second, installation steps

1, extract to the specified directory, such as: C:\Memcached\memcached-win32-1.4.4-14.
2, with cmd Open command window, go to extract the directory, input "memcached.exe-d install".
3, open the Control Panel, open the service, you can see memcached already on the above can, if not started, then manually start.

4, use the Telnet command to verify that the cache server is available.

Do not show anything at first, enter the command stats to see the statistics, the following figure shows that the server is working properly.

Iii. Introduction of parameters

1, the above installation and start-up are in the default environment, in the installation of the following parameters can be set:
-P Listening Port
The IP address of the-l connection, the default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown shut down the running memcached service
-D Install installation memcached service
-d Uninstall Uninstall memcached service
-U Run as (only valid when run as root)
-m maximum memory usage, in MB. Default 64MB
-Returns an error when M memory is exhausted instead of deleting the item
-C Maximum Simultaneous connection number, default is 1024
-F Block size growth factor, default is 1.25
-N Minimum allocation space, key+value+flags default is 48
-H Display Help
such as: "Memcached-d install-l 127.0.0.1-m 1024-c2048".

2, if the installation does not add parameters, you can modify the registry information to set up, open the registry, find
Hkey_local_machine\system\currentcontrolset\services\memcached
In which there is a "ImagePath" entry, the value is:
"C:\Memcached\memcached-win32-1.4.4-14\memcached.exe"-D runservice
Add "-M 1024-c2048" at the back. The following figure:

3, after the input Stats command, the page appears parameter introduction.

STAT PID 4356 server process idstat uptime 56625 Server run time, unit seconds STAT time 1225249079 Server current UNIX times STAT version1.1.0 server version number STAT p Ointer_size 64STAT Rusage_user 151.845489 The cumulative user time for this process (seconds: subtle) STAT Rusage_system 121.667603 The cumulative system time for this process (seconds: subtle) STAT Ibuffer_ Size 4096STAT curr_connections 13 connections Stat total_connections 54136 Total number of connections received since the server was run stat connection_structures 318 Number of connection structures allocated by the server stat Cmd_get 100595 Total Fetch requests STAT Cmd_set 6510 storage requests Total Stat get_hits 96543 Total number of requests succeeded Stat get_misses 4052 Total number of requests failed St The total number of bytes that the at Bytes_read 4427679 server reads from the network stat bytes_written 6585596 Total Bytes sent to the network

Note:

Uptime is the number of seconds that the memcached runs , Cmd_get is the number of query caches. Cmd_get/uptime gets the average number of cache requests per second. Cmd_set is the number of times the Key=>value is set. The whole memcached is a large hash, with cmd_get not found content, will call Cmd_set write into the cache. Get_hits is the number of cache hits, Cache hit Ratio = Get_hits/cmd_get *100%. Get_misses plus get_hits equals Cmd_get. Total_itemscurr_items represents the number of key-value pairs that are now in the cache. Total_items = = Cmd_set = = get_misses, but when the maximum available memory is used, if the memcached is set to delete the content, the above equation is not established.

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.