b6f633dc1551df615f106601efe07163da94e26f
[awesomized/libmemcached] / memcached / doc / memcached.1
1 .TH MEMCACHED 1 "April 11, 2005"
2 .SH NAME
3 memcached \- high-performance memory object caching system
4 .SH SYNOPSIS
5 .B memcached
6 .RI [ options ]
7 .br
8 .SH DESCRIPTION
9 This manual page documents briefly the
10 .B memcached
11 memory object caching daemon.
12 .PP
13 .B memcached
14 is a flexible memory object caching daemon designed to alleviate database load
15 in dynamic web applications by storing objects in memory. It's based on
16 libevent to scale to any size needed, and is specifically optimized to avoid
17 swapping and always use non-blocking I/O.
18 .br
19 .SH OPTIONS
20 These programs follow the usual GNU command line syntax. A summary of options
21 is included below.
22 .TP
23 .B \-s <file>
24 Unix socket path to listen on (disables network support).
25 .TP
26 .B \-a <perms>
27 Permissions (in octal format) for Unix socket created with \-s option.
28 .TP
29 .B \-l <ip_addr>
30 Listen on <ip_addr>; default to INADDR_ANY. This is an important option to
31 consider as there is no other way to secure the installation. Binding to an
32 internal or firewalled network interface is suggested.
33 .TP
34 .B \-d
35 Run memcached as a daemon.
36 .TP
37 .B \-u <username>
38 Assume the identity of <username> (only when run as root).
39 .TP
40 .B \-m <num>
41 Use <num> MB memory max to use for object storage; the default is 64 megabytes.
42 .TP
43 .B \-c <num>
44 Use <num> max simultaneous connections; the default is 1024.
45 .TP
46 .B \-R <num>
47 This option seeks to prevent client starvation by setting a limit to the
48 number of sequential requests the server will process from an individual
49 client connection. Once a connection has exceeded this value, the server will
50 attempt to process I/O on other connections before handling any further
51 request from this connection. The default value for this option is 20.
52 .TP
53 .B \-k
54 Lock down all paged memory. This is a somewhat dangerous option with large
55 caches, so consult the README and memcached homepage for configuration
56 suggestions.
57 .TP
58 .B \-p <num>
59 Listen on TCP port <num>, the default is port 11211.
60 .TP
61 .B \-U <num>
62 Listen on UDP port <num>, the default is port 11211, 0 is off.
63 .TP
64 .B \-M
65 Disable automatic removal of items from the cache when out of memory.
66 Additions will not be possible until adequate space is freed up.
67 .TP
68 .B \-r
69 Raise the core file size limit to the maximum allowable.
70 .TP
71 .B \-f <factor>
72 Use <factor> as the multiplier for computing the sizes of memory chunks that
73 items are stored in. A lower value may result in less wasted memory depending
74 on the total amount of memory available and the distribution of item sizes.
75 The default is 1.25.
76 .TP
77 .B \-n <size>
78 Allocate a minimum of <size> bytes for the item key, value, and flags. The
79 default is 48. If you have a lot of small keys and values, you can get a
80 significant memory efficiency gain with a lower value. If you use a high
81 chunk growth factor (\-f option), on the other hand, you may want to increase
82 the size to allow a bigger percentage of your items to fit in the most densely
83 packed (smallest) chunks.
84 .TP
85 .B \-C
86 Disable the use of CAS (and reduce the per-item size by 8 bytes).
87 .TP
88 .B \-h
89 Show the version of memcached and a summary of options.
90 .TP
91 .B \-v
92 Be verbose during the event loop; print out errors and warnings.
93 .TP
94 .B \-vv
95 Be even more verbose; same as \-v but also print client commands and
96 responses.
97 .TP
98 .B \-i
99 Print memcached and libevent licenses.
100 .TP
101 .B \-P <filename>
102 Print pidfile to <filename>, only used under \-d option.
103 .TP
104 .B \-t <threads>
105 Number of threads to use to process incoming requests. This option is only
106 meaningful if memcached was compiled with thread support enabled. It is
107 typically not useful to set this higher than the number of CPU cores on the
108 memcached server. The default is 4.
109 .TP
110 .B \-D <char>
111 Use <char> as the delimiter between key prefixes and IDs. This is used for
112 per-prefix stats reporting. The default is ":" (colon). If this option is
113 specified, stats collection is turned on automatically; if not, then it may
114 be turned on by sending the "stats detail on" command to the server.
115 .TP
116 .B \-L
117 Try to use large memory pages (if available). Increasing the memory page size
118 could reduce the number of TLB misses and improve the performance. In order to
119 get large pages from the OS, memcached will allocate the total item-cache in
120 one large chunk. Only available if supported on your OS.
121 .TP
122 .B \-B <proto>
123 Specify the binding protocol to use. By default, the server will
124 autonegotiate client connections. By using this option, you can
125 specify the protocol clients must speak. Possible options are "auto"
126 (the default, autonegotiation behavior), "ascii" and "binary".
127 .TP
128 .B \-I <size>
129 Override the default size of each slab page. Default is 1mb. Default is 1m,
130 minimum is 1k, max is 128m. Adjusting this value changes the item size limit.
131 Beware that this also increases the number of slabs (use -v to view), and the
132 overal memory usage of memcached.
133 .TP
134 .B \-o <options>
135 Comma separated list of extended or experimental options. See -h or wiki for
136 up to date list.
137 .br
138 .SH LICENSE
139 The memcached daemon is copyright Danga Interactive and is distributed under
140 the BSD license. Note that daemon clients are licensed separately.
141 .br
142 .SH SEE ALSO
143 The README file that comes with memcached
144 .br
145 .B http://www.danga.com/memcached
146 .SH AUTHOR
147 The memcached daemon was written by Anatoly Vorobey
148 .B <mellon@pobox.com>
149 and Brad Fitzpatrick
150 .B <brad@danga.com>
151 and the rest of the crew of Danga Interactive
152 .B http://www.danga.com
153 .br