1MEMCACHED(1)                General Commands Manual               MEMCACHED(1)
2
3
4

NAME

6       memcached - high-performance memory object caching system
7

SYNOPSIS

9       memcached [options]
10

DESCRIPTION

12       This  manual page documents briefly the memcached memory object caching
13       daemon.
14
15       memcached is a flexible memory object caching daemon designed to  alle‐
16       viate  database  load in dynamic web applications by storing objects in
17       memory.  It's based on libevent to scale to any  size  needed,  and  is
18       specifically  optimized  to  avoid swapping and always use non-blocking
19       I/O.
20

OPTIONS

22       These programs follow the usual GNU command line syntax. A  summary  of
23       options is included below.
24
25       -s, --unix-socket=<file>
26              Unix socket path to listen on (disables network support).
27
28       -A, --enable-shutdown
29              Enable ascii "shutdown" command.
30
31       -a, --unix-mask=<perms>
32              Permissions  (in  octal  format) for Unix socket created with -s
33              option.
34
35       -l, --listen=<addr>
36              Listen on <addr>; default to INADDR_ANY. <addr> may be specified
37              as host:port.  If you don't specify a port number, the value you
38              specified with -p or  -U  is  used.  You  may  specify  multiple
39              addresses separated by comma or by using -l multiple times. This
40              is an important option to consider as there is no other  way  to
41              secure  the  installation.  Binding to an internal or firewalled
42              network interface is suggested.
43
44       -d, --daemon
45              Run memcached as a daemon.
46
47       -u, --user=<username>
48              Assume the identity of <username> (only when run as root).
49
50       -m, --memory-limit=<num>
51              Use <num> MB memory max to use for object storage;  the  default
52              is 64 megabytes.
53
54       -c, --conn-limit=<num>
55              Use <num> max simultaneous connections; the default is 1024.
56
57       -R, --max-reqs-per-event=<num>
58              This  option  seeks  to  prevent  client starvation by setting a
59              limit to the number  of  sequential  requests  the  server  will
60              process  from an individual client connection. Once a connection
61              has exceeded this value, the server will attempt to process  I/O
62              on  other  connections  before handling any further request from
63              this connection. The default value for this option is 20.
64
65       -k, --lock-memory
66              Lock down all paged memory. This is a somewhat dangerous  option
67              with  large caches, so consult the README and memcached homepage
68              for configuration suggestions.
69
70       -p, --port=<num>
71              Listen on TCP port <num>, the default is  port  11211.  0  means
72              off.
73
74       -U, --udp-port=<num>
75              Listen on UDP port <num>, the default is port 0, which is off.
76
77       -M, --disable-evictions
78              Disable  automatic  removal  of items from the cache when out of
79              memory.  Additions will not be possible until adequate space  is
80              freed up.
81
82       -r, --enable-coredumps
83              Raise the core file size limit to the maximum allowable.
84
85       -f, --slab-growth-factor=<factor>
86              Use <factor> as the multiplier for computing the sizes of memory
87              chunks that items are stored in. A lower  value  may  result  in
88              less  wasted  memory  depending  on  the  total amount of memory
89              available and the distribution of item sizes.   The  default  is
90              1.25.
91
92       -n, --slab-min-size=<size>
93              Allocate  a minimum of <size> bytes for the item key, value, and
94              flags. The default is 48. If you have a lot of  small  keys  and
95              values,  you can get a significant memory efficiency gain with a
96              lower value. If you use a high chunk growth factor (-f  option),
97              on  the other hand, you may want to increase the size to allow a
98              bigger percentage of your items  to  fit  in  the  most  densely
99              packed (smallest) chunks.
100
101       -C, --disable-cas
102              Disable  the  use  of  CAS  (and  reduce  the per-item size by 8
103              bytes).
104
105       -h, --help
106              Show the version of memcached and a summary of options.
107
108       -v, --verbose
109              Be verbose during the event loop; print out errors and warnings.
110
111       -vv    Be even more verbose; same as -v but also print client  commands
112              and responses.
113
114       -vvv   Be  extremely verbose; same of the above and also print internal
115              state transitions.
116
117       -i, --license
118              Print memcached and libevent licenses.
119
120       -P, --pidfile=<filename>
121              Print pidfile to <filename>, only used under -d option.
122
123       -t, --threads=<threads>
124              Number of threads to use  to  process  incoming  requests.  This
125              option  is only meaningful if memcached was compiled with thread
126              support enabled. It is typically not useful to set  this  higher
127              than  the number of CPU cores on the memcached server. Setting a
128              high number (64 or more) of worker threads is  not  recommended.
129              The default is 4.
130
131       -D <char>
132              Use  <char>  as the delimiter between key prefixes and IDs. This
133              is used for per-prefix  stats  reporting.  The  default  is  ":"
134              (colon). If this option is specified, stats collection is turned
135              on automatically; if not, then it may be turned  on  by  sending
136              the "stats detail on" command to the server.
137
138       -L, --enable-largepages
139              Try  to  use  large  memory pages (if available). Increasing the
140              memory page size could reduce  the  number  of  TLB  misses  and
141              improve  the  performance.  In order to get large pages from the
142              OS, memcached will allocate the total item-cache  in  one  large
143              chunk. Only available if supported on your OS.
144
145       -b, --listen-backlog=<num>
146              Set the backlog queue limit to <num> connections. The default is
147              1024.
148
149       -B, --protocol=<proto>
150              Specify the binding protocol to use.   By  default,  the  server
151              will  autonegotiate  client  connections.  By using this option,
152              you can specify  the  protocol  clients  must  speak.   Possible
153              options  are  "auto"  (the  default,  autonegotiation behavior),
154              "ascii" and "binary".
155
156       -I, --max-item-size=<size>
157              Override the default size of each slab page. The default size is
158              1mb.  Default value for this parameter is 1m, minimum is 1k, max
159              is 128m.  Adjusting this value changes the item size limit.
160
161       -S, --enable-sasl
162              Turn on SASL authentication. This option is only  meaningful  if
163              memcached was compiled with SASL support enabled.
164
165       -F, --disable-flush-all
166              Disables  the  "flush_all"  command.  The cmd_flush counter will
167              increment, but clients will receive an  error  message  and  the
168              flush will not occur.
169
170       -X, --disable-dumping
171              Disables  the  "stats cachedump" and "lru_crawler metadump" com‐
172              mands.
173
174       -o, --extended=<options>
175              Comma separated list of extended or experimental options. See -h
176              or wiki for up to date list.
177
178       -V, --version
179              print version and exit
180

LICENSE

182       The  memcached daemon is copyright Danga Interactive and is distributed
183       under the BSD license. Note that  daemon  clients  are  licensed  sepa‐
184       rately.
185

SEE ALSO

187       The README file that comes with memcached
188       https://www.memcached.org
189

AUTHOR

191       The  memcached daemon was written by Anatoly Vorobey <mellon@pobox.com>
192       and Brad Fitzpatrick <brad@danga.com> and the rest of the crew of Danga
193       Interactive https://www.danga.com
194
195
196
197                                April 11, 2005                    MEMCACHED(1)
Impressum