memcached Start-Configuration parameters

Source: Internet
Author: User
Tags cas

memcached Startup Parameters

[[email protected] ~] # memcached -h memcached 1.4.14 -p <num>      TCP port number to listen on (default: 11211) -U <num>      UDP port number to listen on (default: 11211, 0 is off) -s < file >     UNIX socket path to listen on (disables network support) -a <mask>     access mask for UNIX socket, in octal (default: 0700) -l <addr>     interface to listen on (default: INADDR_ANY, all addresses)                <addr> may be specified as host:port. If you don‘t specify                a port number, the value you specified with -p or -U is                used. You may specify multiple addresses separated by comma                or by using -l multiple times -d            run as a daemon -r            maximize core file limit -u <username> assume identity of <username> (only when run as root) -m <num>      max memory to use for items in megabytes (default: 64 MB) -M            return error on memory exhausted (rather than removing items) -c <num>      max simultaneous connections (default: 1024) -k            lock down all paged memory.  Note that there is a                limit on how much memory you may lock.  Trying to                allocate more than that would fail, so be sure you                set the limit correctly for the user you started                the daemon with (not for -u <username> user;                under sh this is done with ‘ulimit -S -l NUM_KB‘ ). - v verbose (print errors /warnings while in event loop) -vv           very verbose (also print client commands /reponses ) -vvv          extremely verbose (also print internal state transitions) -h            print this help and exit -i            print memcached and libevent license -P < file >     save PID in < file >, only used with -d option -f <factor>   chunk size growth factor (default: 1.25) -n <bytes>    minimum space allocated for key+value+flags (default: 48) -L            Try to use large memory pages ( if available). Increasing                the memory page size could reduce the number of TLB misses                and improve the performance. In order to get large pages                from the OS, memcached will allocate the total item-cache                in one large chunk. -D <char>     Use <char> as the delimiter between key prefixes and IDs.                This is used for per-prefix stats reporting. The default is                ":" (colon). If this option is specified, stats collection                is turned on automatically; if not, then it may be turned on                by sending the "stats detail on" command to the server. -t <num>      number of threads to use (default: 4) -R            Maximum number of requests per event, limits the number of                requests process for a given connection to prevent                starvation (default: 20) -C            Disable use of CAS -b            Set the backlog queue limit (default: 1024) -B            Binding protocol - one of ascii, binary, or auto (default) -I            Override the size of each slab page. Adjusts max item size                (default: 1mb, min: 1k, max: 128m) -o            Comma separated list of extended or experimental options                - (EXPERIMENTAL) maxconns_fast: immediately close new                  connections if over maxconns limit                - hashpower: An integer multiplier for how large the hash                  table should be. Can be grown at runtime if not big enough.                  Set this based on "STAT hash_power_level" before a                  restart. [ro[email protected] ~] #


-P Specify port number (default 11211)

-U <num> UDP Listening port (default: 11211, 0 o'clock off)

-S <file> UNIX socket path for listening (disable network support)

-A <mask> UNIX socket access mask, octal digits (default: 0700)

-m specifies the maximum amount of memory to use (default 64MB)

-T thread count (default 4)

-L <ip_addr> Bind address (default: All allowed, regardless of internal or external network or local replacement IP, there is a security risk, if set to 127.0.0.1 can only be native access)

-D Start memcached service

-D Restart Restart memcached service

-D Stop|shutdown Close the running memcached service

-U <username> bind use specified for Run process <username> (only the root user can use this parameter)

-P <file> writes the PID to the file <file>, which enables fast process termination behind and needs to be used with-D

-m maximum memory usage, in megabytes. Default 64MB

-M running out of memory and returning an error instead of deleting an item

-c Maximum number of simultaneous connections, default is 1024

-F Block size growth factor, default is 1.25

-N <bytes> Minimum allocated space, key+value+flags default is 48

-K locks all memory pages. Note that you can lock the upper memory limit.

Attempts to allocate more memory fail, so be aware of the user-assignable memory limit that is used when the daemon is started.

(Not the front-u <username> parameter; under SH, use the command "ulimit-s-L num_kb" to set.) )

-V Prompt message (Error/warning information is printed in the event loop.) )

-VV details (also print client commands/responses)

-VVV Super Details (also prints changes in the internal state)

-H Print this help message and exit.

-I print licenses for memcached and Libevent.

-L attempts to use a large memory page, if available. Increasing the memory page size can reduce the number of page table buffer (TLB) misses and improve operational efficiency.

in order to operate from system To get a large memory page, memcached will assign all the data items to a large chunk.

-D <char> use <char> as a delimiter for prefixes and IDs.

This is used to get status reports by prefix. The default is ":" (colon).

If this parameter is specified, the state collection is automatically turned on, and if not specified, the command "stats detail on" is required to open.

-T <num> number of threads Used (default: 4)

-R The maximum number of requests that can be processed per connection.

-C disables CAs.

-B Set the length of the background log queue (default: 1024)

-B Binding Protocol-possible value: Ascii,binary,auto (default)

-I overrides each data page size. Adjusts the maximum size of the data item.

Common combinations:

/usr/local/memcached/bin/memcached-d-M 256-p 11211-u www-l 127.0.0.1


memcached Start-Configuration parameters

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.