| 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 INDRR_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 \-k |
|---|
| 47 | Lock down all paged memory. This is a somewhat dangerous option with large |
|---|
| 48 | caches, so consult the README and memcached homepage for configuration |
|---|
| 49 | suggestions. |
|---|
| 50 | .TP |
|---|
| 51 | .B \-p <num> |
|---|
| 52 | Listen on TCP port <num>, the default is port 11211. |
|---|
| 53 | .TP |
|---|
| 54 | .B \-U <num> |
|---|
| 55 | Listen on UDP port <num>, the default is 0, off. |
|---|
| 56 | .TP |
|---|
| 57 | .B \-M |
|---|
| 58 | Disable automatic removal of items from the cache when out of memory. |
|---|
| 59 | Additions will not be possible until adequate space is freed up. |
|---|
| 60 | .TP |
|---|
| 61 | .B \-r |
|---|
| 62 | Raise the core file size limit to the maximum allowable. |
|---|
| 63 | .TP |
|---|
| 64 | .B \-b |
|---|
| 65 | Run a managed instanced (mnemonic: buckets)\n". |
|---|
| 66 | .TP |
|---|
| 67 | .B \-f <factor> |
|---|
| 68 | Use <factor> as the multiplier for computing the sizes of memory chunks that |
|---|
| 69 | items are stored in. A lower value may result in less wasted memory depending |
|---|
| 70 | on the total amount of memory available and the distribution of item sizes. |
|---|
| 71 | The default is 1.25. |
|---|
| 72 | .TP |
|---|
| 73 | .B \-n <size> |
|---|
| 74 | Allocate a minimum of <size> bytes for the item key, value, and flags. The |
|---|
| 75 | default is 48. If you have a lot of small keys and values, you can get a |
|---|
| 76 | significant memory efficiency gain with a lower value. If you use a high |
|---|
| 77 | chunk growth factor (-f option), on the other hand, you may want to increase |
|---|
| 78 | the size to allow a bigger percentage of your items to fit in the most densely |
|---|
| 79 | packed (smallest) chunks. |
|---|
| 80 | .TP |
|---|
| 81 | .B \-h |
|---|
| 82 | Show the version of memcached and a summary of options. |
|---|
| 83 | .TP |
|---|
| 84 | .B \-v |
|---|
| 85 | Be verbose during the event loop; print out errors and warnings. |
|---|
| 86 | .TP |
|---|
| 87 | .B \-vv |
|---|
| 88 | Be even more verbose; same as \-v but also print client commands and |
|---|
| 89 | responses. |
|---|
| 90 | .TP |
|---|
| 91 | .B \-i |
|---|
| 92 | Print memcached and libevent licenses. |
|---|
| 93 | .TP |
|---|
| 94 | .B \-P <filename> |
|---|
| 95 | Print pidfile to <filename>, only used under -d option. |
|---|
| 96 | .TP |
|---|
| 97 | .B \-t <threads> |
|---|
| 98 | Number of threads to use to process incoming requests. This option is only |
|---|
| 99 | meaningful if memcached was compiled with thread support enabled. It is |
|---|
| 100 | typically not useful to set this higher than the number of CPU cores on the |
|---|
| 101 | memcached server. The default is 4. |
|---|
| 102 | .TP |
|---|
| 103 | .B \-D <char> |
|---|
| 104 | Use <char> as the delimiter between key prefixes and IDs. This is used for |
|---|
| 105 | per-prefix stats reporting. The default is ":" (colon). If this option is |
|---|
| 106 | specified, stats collection is turned on automatically; if not, then it may |
|---|
| 107 | be turned on by sending the "stats detail on" command to the server. |
|---|
| 108 | .TP |
|---|
| 109 | .B \-L |
|---|
| 110 | Try to use large memory pages (if available). Increasing the memory page size |
|---|
| 111 | could reduce the number of TLB misses and improve the performance. In order to |
|---|
| 112 | get large pages from the OS, memcached will allocate the total item-cache in |
|---|
| 113 | one large chunk. Only available if supported on your OS. |
|---|
| 114 | .br |
|---|
| 115 | .SH LICENSE |
|---|
| 116 | The memcached daemon is copyright Danga Interactive and is distributed under |
|---|
| 117 | the BSD license. Note that daemon clients are licensed separately. |
|---|
| 118 | .br |
|---|
| 119 | .SH SEE ALSO |
|---|
| 120 | The README file that comes with memcached |
|---|
| 121 | .br |
|---|
| 122 | .B http://www.danga.com/memcached |
|---|
| 123 | .SH AUTHOR |
|---|
| 124 | The memcached daemon was written by Anatoly Vorobey |
|---|
| 125 | .B <mellon@pobox.com> |
|---|
| 126 | and Brad Fitzpatrick |
|---|
| 127 | .B <brad@danga.com> |
|---|
| 128 | and the rest of the crew of Danga Interactive |
|---|
| 129 | .B http://www.danga.com |
|---|
| 130 | .br |
|---|