|
Packit |
4e8bc4 |
.TH MEMCACHED 1 "April 11, 2005"
|
|
Packit |
4e8bc4 |
.SH NAME
|
|
Packit |
4e8bc4 |
memcached \- high-performance memory object caching system
|
|
Packit |
4e8bc4 |
.SH SYNOPSIS
|
|
Packit |
4e8bc4 |
.B memcached
|
|
Packit |
4e8bc4 |
.RI [ options ]
|
|
Packit |
4e8bc4 |
.br
|
|
Packit |
4e8bc4 |
.SH DESCRIPTION
|
|
Packit |
4e8bc4 |
This manual page documents briefly the
|
|
Packit |
4e8bc4 |
.B memcached
|
|
Packit |
4e8bc4 |
memory object caching daemon.
|
|
Packit |
4e8bc4 |
.PP
|
|
Packit |
4e8bc4 |
.B memcached
|
|
Packit |
4e8bc4 |
is a flexible memory object caching daemon designed to alleviate database load
|
|
Packit |
4e8bc4 |
in dynamic web applications by storing objects in memory. It's based on
|
|
Packit |
4e8bc4 |
libevent to scale to any size needed, and is specifically optimized to avoid
|
|
Packit |
4e8bc4 |
swapping and always use non-blocking I/O.
|
|
Packit |
4e8bc4 |
.br
|
|
Packit |
4e8bc4 |
.SH OPTIONS
|
|
Packit |
4e8bc4 |
These programs follow the usual GNU command line syntax. A summary of options
|
|
Packit |
4e8bc4 |
is included below.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-s, --unix-socket=<file>
|
|
Packit |
4e8bc4 |
Unix socket path to listen on (disables network support).
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-A, --enable-shutdown
|
|
Packit |
4e8bc4 |
Enable ascii "shutdown" command.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-a, --unix-mask=<perms>
|
|
Packit |
4e8bc4 |
Permissions (in octal format) for Unix socket created with \-s option.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-l, --listen=<addr>
|
|
Packit |
4e8bc4 |
Listen on <addr>; default to INADDR_ANY. <addr> may be specified as host:port.
|
|
Packit |
4e8bc4 |
If you don't specify a port number, the value you specified with -p or -U is
|
|
Packit |
4e8bc4 |
used. You may specify multiple addresses separated by comma or by using -l
|
|
Packit |
4e8bc4 |
multiple times. This is an important option to consider as there is no other
|
|
Packit |
4e8bc4 |
way to secure the installation. Binding to an internal or firewalled network
|
|
Packit |
4e8bc4 |
interface is suggested.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-d, --daemon
|
|
Packit |
4e8bc4 |
Run memcached as a daemon.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-u, --user=<username>
|
|
Packit |
4e8bc4 |
Assume the identity of <username> (only when run as root).
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-m, --memory-limit=<num>
|
|
Packit |
4e8bc4 |
Use <num> MB memory max to use for object storage; the default is 64 megabytes.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-c, --conn-limit=<num>
|
|
Packit |
4e8bc4 |
Use <num> max simultaneous connections; the default is 1024.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-R, --max-reqs-per-event=<num>
|
|
Packit |
4e8bc4 |
This option seeks to prevent client starvation by setting a limit to the
|
|
Packit |
4e8bc4 |
number of sequential requests the server will process from an individual
|
|
Packit |
4e8bc4 |
client connection. Once a connection has exceeded this value, the server will
|
|
Packit |
4e8bc4 |
attempt to process I/O on other connections before handling any further
|
|
Packit |
4e8bc4 |
request from this connection. The default value for this option is 20.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-k, --lock-memory
|
|
Packit |
4e8bc4 |
Lock down all paged memory. This is a somewhat dangerous option with large
|
|
Packit |
4e8bc4 |
caches, so consult the README and memcached homepage for configuration
|
|
Packit |
4e8bc4 |
suggestions.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-p, --port=<num>
|
|
Packit |
4e8bc4 |
Listen on TCP port <num>, the default is port 11211. 0 means off.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-U, --udp-port=<num>
|
|
Packit |
4e8bc4 |
Listen on UDP port <num>, the default is port 0, which is off.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-M, --disable-evictions
|
|
Packit |
4e8bc4 |
Disable automatic removal of items from the cache when out of memory.
|
|
Packit |
4e8bc4 |
Additions will not be possible until adequate space is freed up.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-r, --enable-coredumps
|
|
Packit |
4e8bc4 |
Raise the core file size limit to the maximum allowable.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-f, --slab-growth-factor=<factor>
|
|
Packit |
4e8bc4 |
Use <factor> as the multiplier for computing the sizes of memory chunks that
|
|
Packit |
4e8bc4 |
items are stored in. A lower value may result in less wasted memory depending
|
|
Packit |
4e8bc4 |
on the total amount of memory available and the distribution of item sizes.
|
|
Packit |
4e8bc4 |
The default is 1.25.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-n, --slab-min-size=<size>
|
|
Packit |
4e8bc4 |
Allocate a minimum of <size> bytes for the item key, value, and flags. The
|
|
Packit |
4e8bc4 |
default is 48. If you have a lot of small keys and values, you can get a
|
|
Packit |
4e8bc4 |
significant memory efficiency gain with a lower value. If you use a high
|
|
Packit |
4e8bc4 |
chunk growth factor (\-f option), on the other hand, you may want to increase
|
|
Packit |
4e8bc4 |
the size to allow a bigger percentage of your items to fit in the most densely
|
|
Packit |
4e8bc4 |
packed (smallest) chunks.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-C, --disable-cas
|
|
Packit |
4e8bc4 |
Disable the use of CAS (and reduce the per-item size by 8 bytes).
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-h, --help
|
|
Packit |
4e8bc4 |
Show the version of memcached and a summary of options.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-v, --verbose
|
|
Packit |
4e8bc4 |
Be verbose during the event loop; print out errors and warnings.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-vv
|
|
Packit |
4e8bc4 |
Be even more verbose; same as \-v but also print client commands and
|
|
Packit |
4e8bc4 |
responses.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-vvv
|
|
Packit |
4e8bc4 |
Be extremely verbose; same of the above and also print internal state transitions.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-i, --license
|
|
Packit |
4e8bc4 |
Print memcached and libevent licenses.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-P, --pidfile=<filename>
|
|
Packit |
4e8bc4 |
Print pidfile to <filename>, only used under \-d option.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-t, --threads=<threads>
|
|
Packit |
4e8bc4 |
Number of threads to use to process incoming requests. This option is only
|
|
Packit |
4e8bc4 |
meaningful if memcached was compiled with thread support enabled. It is
|
|
Packit |
4e8bc4 |
typically not useful to set this higher than the number of CPU cores on the
|
|
Packit |
4e8bc4 |
memcached server. Setting a high number (64 or more) of worker
|
|
Packit |
4e8bc4 |
threads is not recommended. The default is 4.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-D <char>
|
|
Packit |
4e8bc4 |
Use <char> as the delimiter between key prefixes and IDs. This is used for
|
|
Packit |
4e8bc4 |
per-prefix stats reporting. The default is ":" (colon). If this option is
|
|
Packit |
4e8bc4 |
specified, stats collection is turned on automatically; if not, then it may
|
|
Packit |
4e8bc4 |
be turned on by sending the "stats detail on" command to the server.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-L, --enable-largepages
|
|
Packit |
4e8bc4 |
Try to use large memory pages (if available). Increasing the memory page size
|
|
Packit |
4e8bc4 |
could reduce the number of TLB misses and improve the performance. In order to
|
|
Packit |
4e8bc4 |
get large pages from the OS, memcached will allocate the total item-cache in
|
|
Packit |
4e8bc4 |
one large chunk. Only available if supported on your OS.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-b, --listen-backlog=<num>
|
|
Packit |
4e8bc4 |
Set the backlog queue limit to <num> connections. The default is 1024.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-B, --protocol=<proto>
|
|
Packit |
4e8bc4 |
Specify the binding protocol to use. By default, the server will
|
|
Packit |
4e8bc4 |
autonegotiate client connections. By using this option, you can
|
|
Packit |
4e8bc4 |
specify the protocol clients must speak. Possible options are "auto"
|
|
Packit |
4e8bc4 |
(the default, autonegotiation behavior), "ascii" and "binary".
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-I, --max-item-size=<size>
|
|
Packit |
4e8bc4 |
Override the default size of each slab page. The default size is 1mb. Default
|
|
Packit |
4e8bc4 |
value for this parameter is 1m, minimum is 1k, max is 1G (1024 * 1024 * 1024).
|
|
Packit |
4e8bc4 |
Adjusting this value changes the item size limit.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-S, --enable-sasl
|
|
Packit |
4e8bc4 |
Turn on SASL authentication. This option is only meaningful if memcached was
|
|
Packit |
4e8bc4 |
compiled with SASL support enabled.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-F, --disable-flush-all
|
|
Packit |
4e8bc4 |
Disables the "flush_all" command. The cmd_flush counter will increment, but
|
|
Packit |
4e8bc4 |
clients will receive an error message and the flush will not occur.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-X, --disable-dumping
|
|
Packit |
4e8bc4 |
Disables the "stats cachedump" and "lru_crawler metadump" commands.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-o, --extended=<options>
|
|
Packit |
4e8bc4 |
Comma separated list of extended or experimental options. See \-h or wiki for
|
|
Packit |
4e8bc4 |
up to date list.
|
|
Packit |
4e8bc4 |
.TP
|
|
Packit |
4e8bc4 |
.B \-V, --version
|
|
Packit |
4e8bc4 |
print version and exit
|
|
Packit |
4e8bc4 |
.br
|
|
Packit |
4e8bc4 |
.SH LICENSE
|
|
Packit |
4e8bc4 |
The memcached daemon is copyright Danga Interactive and is distributed under
|
|
Packit |
4e8bc4 |
the BSD license. Note that daemon clients are licensed separately.
|
|
Packit |
4e8bc4 |
.br
|
|
Packit |
4e8bc4 |
.SH SEE ALSO
|
|
Packit |
4e8bc4 |
The README file that comes with memcached
|
|
Packit |
4e8bc4 |
.br
|
|
Packit |
4e8bc4 |
.B https://www.memcached.org
|
|
Packit |
4e8bc4 |
.SH AUTHOR
|
|
Packit |
4e8bc4 |
The memcached daemon was written by Anatoly Vorobey
|
|
Packit |
4e8bc4 |
.B <mellon@pobox.com>
|
|
Packit |
4e8bc4 |
and Brad Fitzpatrick
|
|
Packit |
4e8bc4 |
.B <brad@danga.com>
|
|
Packit |
4e8bc4 |
and the rest of the crew of Danga Interactive
|
|
Packit |
4e8bc4 |
.B https://www.danga.com
|
|
Packit |
4e8bc4 |
.br
|