MEMCACHED(1)
๐ MEMCACHED ๐
okay bestie, buckle up, we're reading the MEMCACHED(1) page together and honestly? it's giving infrastructure icon. This is the manual for memcached, and it lives in the General Commands Manual section, which is the fancy way of saying "yes it's a command, yes it's a big deal." โจ
๐ธ NAME ๐ธ
memcached โ a high-performance memory object caching system. that's it, that's the whole vibe. ๐
๐ฆ SYNOPSIS ๐ฆ
memcached [options]
โจ DESCRIPTION โจ
so like, this page is the brief little rundown of the memcached memory object caching daemon. consider it the trailer, not the whole movie. ๐ฌ
memcached is a flexible memory object caching daemon โ it was literally designed to take load off your database in dynamic web apps by, you guessed it, storing objects in memory instead. it's based on libevent so it can scale to whatever size you need, no cap. and the way it's specifically optimized to avoid swapping and always use non-blocking I/O? obsessed. ๐ฅ
๐ OPTIONS ๐
these programs follow the usual GNU command line syntax, so nothing chaotic there. here's the full rundown, and yes, we're doing all of them, no skipping. ๐
-s,--unix-socket=<file>โ unix socket path to listen on. heads up: this disables network support, so it's giving "we only talk locally." ๐-A,--enable-shutdownโ enables the ascii"shutdown"command.-a,--unix-mask=<perms>โ the permissions (in octal format, bestie, octal) for the Unix socket created with the-soption.-l,--listen=<addr>โ listen on<addr>; defaults toINADDR_ANY.<addr>can be given ashost:port. if you don't specify a port number, the value you set with-por-Ugets used instead. you can also specify multiple addresses separated by commas, or just use-lmultiple times. this is an important option to think about, because there is literally no other way to secure the installation. binding to an internal or firewalled network interface is suggested. ๐-d,--daemonโ runmemcachedas a daemon.-u,--user=<username>โ assume the identity of<username>(only when run as root).-m,--memory-limit=<num>โ use<num>MB memory max for object storage; the default is64megabytes.-c,--conn-limit=<num>โ use<num>max simultaneous connections; the default is1024.-R,--max-reqs-per-event=<num>โ this one is here to prevent client starvation by capping how many sequential requests the server will process from a single client connection. once a connection goes past this value, the server will try to process I/O on other connections before handling any further request from this one. the default value is20.-k,--lock-memoryโ lock down all paged memory. โ ๏ธ ngl, this is a somewhat dangerous option with large caches, so go consult the README and the memcached homepage for configuration suggestions before you get bold.-p,--port=<num>โ listen on TCP port<num>, the default is port11211.0means off.-U,--udp-port=<num>โ listen on UDP port<num>, the default is port0, which is off.-M,--disable-evictionsโ disable automatic removal of items from the cache when it's out of memory. heads up: additions will not be possible until adequate space is freed up. ๐-r,--enable-coredumpsโ raise the core file size limit to the maximum allowable.-f,--slab-growth-factor=<factor>โ use<factor>as the multiplier for computing the sizes of memory chunks that items get stored in. a lower value may result in less wasted memory, depending on the total amount of memory available and the distribution of item sizes. the default is1.25.-n,--slab-min-size=<size>โ allocate a minimum of<size>bytes for the item key, value, and flags. the default is48. if you have a lot of small keys and values, a lower value can get you a significant memory efficiency gain. but if you use a high chunk growth factor (the-foption), you might instead want to increase the size so a bigger percentage of your items fit in the most densely packed (smallest) chunks.-C,--disable-casโ disable the use of CAS (and reduce the per-item size by8bytes).-h,--helpโ show the version ofmemcachedand a summary of options.-v,--verboseโ be verbose during the event loop; print out errors and warnings.-vvโ be even more verbose; same as-vbut also prints client commands and responses.-vvvโ be extremely verbose; same as the above and also prints internal state transitions. this is the "main character" level of logging. ๐-i,--licenseโ printmemcachedandlibeventlicenses.-P,--pidfile=<filename>โ print pidfile to<filename>, only used under the-doption.-t,--threads=<threads>โ number of threads to use to process incoming requests. this option is only meaningful ifmemcachedwas compiled with thread support enabled. it's typically not useful to set this higher than the number of CPU cores on thememcachedserver. setting a high number (64or more) of worker threads is not recommended. the default is4.-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.-L,--enable-largepagesโ try to use large memory pages (if available). increasing the memory page size could reduce the number of TLB misses and improve performance. in order to get large pages from the OS,memcachedwill allocate the total item-cache in one large chunk. only available if supported on your OS. ๐ซถ-b,--listen-backlog=<num>โ set the backlog queue limit to<num>connections. the default is1024.-B,--protocol=<proto>โ specify the binding protocol to use. by default, the server will autonegotiate client connections. by using this option, you can specify the protocol clients must speak. possible options are"auto"(the default, autonegotiation behavior),"ascii"and"binary".-I,--max-item-size=<size>โ adjusting this value changes the item size limit. the default value for this parameter is1m, minimum is1k, max is1G(1024 * 1024 * 1024).-S,--enable-saslโ turn on SASL authentication. this option is only meaningful ifmemcachedwas compiled with SASL support enabled.-F,--disable-flush-allโ disables the"flush_all"command. thecmd_flushcounter will increment, but clients will receive an error message and the flush will not occur.-X,--disable-dumpingโ disables the"stats cachedump"and"lru_crawler metadump"commands.-o,--extended=<options>โ comma separated list of extended or experimental options. see-hor the wiki for the up-to-date list. ๐ง-V,--versionโ print version and exit.
๐ LICENSE ๐
the memcached daemon is copyright Danga Interactive and is distributed under the BSD license. important lil note: daemon clients are licensed separately, so don't go assuming they're bundled together. ๐
๐ SEE ALSO ๐
- the
READMEfile that comes withmemcached https://www.memcached.org
โญ AUTHOR โญ
the memcached daemon was written by Anatoly Vorobey <mellon@pobox.com> and Brad Fitzpatrick <brad@danga.com> and the rest of the crew of Danga Interactive https://www.danga.com โ legends, fr fr. ๐
and that's a wrap, bestie!! ๐ this page is dated April 11, 2005, and it's part of the General Commands Manual for memcached. yes, it's old, yes it's still iconic, and no, we don't gatekeep it. mwah ๐
๐โจ
๐ฆ where this page comes from
- alpine 3.23: memcached-doc 1.6.42-r0 ยท BSD-3-Clause
- alpine 3.24: memcached-doc 1.6.42-r0 ยท BSD-3-Clause
- arch rolling: memcached 1.6.45-1 ยท BSD-3-Clause
- debian trixie: memcached 1.6.38-1 ยท BSD-3-Clause
- fedora 43: memcached 1.6.39-2.fc43 ยท BSD-3-clause AND Zlib AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 43: memcached 1.6.45-1.fc43 ยท BSD-3-clause AND Zlib AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: memcached 1.6.40-2.fc44 ยท BSD-3-clause AND Zlib AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: memcached 1.6.45-1.fc44 ยท BSD-3-clause AND Zlib AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
- nixos 26.05: memcached 1.6.45
- nixpkgs unstable: memcached 1.6.45
- opensuse-leap 16.0: memcached 1.6.38-160000.4.1 ยท BSD-3-Clause
- opensuse-leap 16.0: memcached 1.6.38-160000.4.1 ยท BSD-3-Clause
- opensuse-leap 16.0: memcached 1.6.38-160000.4.1 ยท BSD-3-Clause
- opensuse-leap 16.0: memcached 1.6.38-160000.4.1 ยท BSD-3-Clause
- ubuntu questing: memcached 1.6.38-1build1
- ubuntu questing: memcached 1.6.38-1ubuntu0.1
- ubuntu resolute: memcached 1.6.40-1 ยท BSD-3-Clause
- ubuntu resolute: memcached 1.6.40-1ubuntu0.3 ยท BSD-3-Clause
- ubuntu stonking: memcached 1.6.45-1ubuntu1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms