Getting Started with memcached (ii)

Source: Internet
Author: User

Initial solution of memcached configuration parameters

First, the basic parameters

When we first installed memcached, this command was generally used:

memcached-m 512-u root-d-l 127.0.0.1-p 11211

Let's take a look at the meanings of these parameters respectively:


- m Specifies the maximum amount of memory used by the cache in megabytes, which is 64MB by default

-u Specifies this parameter only when run as root

-D runs in daemon form

-l Specifies the address of the listener

-p Specifies the TCP port number to listen on, default is 11211


Second, the other commonly used parameters

-t specifies the number of threads, the default is 4

-H Printing Help information

-c Maximum number of simultaneous connections, default is 1024.

-u Specifies the UDP port number to listen on, default is 11211

-M displays an error when running out of memory instead of deleting an item


The first "-D" parameter needs further explanation.

-D Install installation memcached

-D Uninstall Uninstall memcached

-D Start memcached service

-D Restart Restart memcached service

-D Stop Stop memcached service

-D Shutdown Stop memcached service

Three, more parameters

Use "-H" to understand it ~


Iv. experience in using the service software

Write here, and finally say. In the use of any software, the first thing to pay attention to such points:


1. Printing Help information:

This is generally "-h", of course, there is a need for "-help" can be.


2. command to start, stop, restart/reload the configuration:

Note that the different parameters of the same command are identified, or different commands or scripts are used.


3. Configuration

First, start whether the configuration file is required.

Second, if it is relatively large software, usually need configuration file, then the default configuration file where to be clear.

Again, specify the format of the command to load the configuration file.


4. Specify the use of memory capacity, number of threads, hard disk capacity, etc.

Whether there are configuration parameters for this need to be specified, and how to set up.


5. log files

First, whether there are log files that need to be stored.

Second, if there is a log file, what is the default storage directory.

Finally, manually specify the command format for the log file.


6. Maximum number of connections

First, whether to provide a listening connection service.

Second, if provided, the default maximum number of connections.

Finally, specify the command format for the maximum number of connections manually.


Getting Started with memcached (ii)

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.