(base) sv@sv-NF5280M5:/home/sv$ apt show memcached Package: memcached Version: 1.5.22-2ubuntu0.3 Priority: optional Section: web Origin: Ubuntu Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Chris Lamb <lamby@debian.org> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 340 kB Pre-Depends: init-system-helpers (>= 1.54~) Depends: adduser, libssl1.1 (>= 1.1.0), lsb-base, perl, perl:any, libc6 (>= 2.17), libevent-2.1-7 (>= 2.1.8-stable), libsasl2-2 (>= 2.1.27+dfsg) Suggests: libanyevent-perl, libcache-memcached-perl, libmemcached, libterm-readkey-perl, libyaml-perl Homepage: https://memcached.org/ Download-Size: 128 kB APT-Manual-Installed: yes APT-Sources: http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 Packages Description: High-performance in-memory object caching system Danga Interactive developed memcached to enhance the speed of LiveJournal.com, a site which was already doing 20 million+ dynamic page views per day for 1 million users with a bunch of webservers and a bunch of database servers. memcached dropped the database load to almost nothing, yielding faster page load timesforusers, better resource utilization, and faster access to the databases on a memcache miss. . memcached optimizes specific high-load serving applications that are designed to take advantage of its versatile no-locking memory access system. Clients are available in several different programming languages, to suit the needs of the specific application. Traditionally this has been used in mod_perl apps to avoid storing large chunks of data in Apache memory, and to share this burden across several machines
(base) sv@sv-NF5280M5:/home/sv$ cat /etc/memcached.conf # memcached default config file # 2003 - Jay Bonci <jaybonci@debian.org> # This configuration file is read by the start-memcached script provided as # part of the Debian GNU/Linux distribution.
# Run memcached as a daemon. This command is implied, and is not needed for the # daemon to run. See the README.Debian that comes with this package for more # information. -d
# Log memcached's output to /var/log/memcached logfile /var/log/memcached.log
# Be verbose # -v
# Be even more verbose (print client commands as well) # -vv
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default # Note that the daemon will grow to this size, but does not start out holding this much # memory -m 64
# Default connection port is 11211 -p 11211
# Run the daemon as root. The start-memcached will default to running as root if no # -u command is present in this config file -u memcache
# Specify which IP address to listen on. The default is to listen on all IP addresses # This parameter is one of the only security measures that memcached has, so make sure # it's listening on a firewalled interface. -l 127.0.0.1
# Limit the number of simultaneous incoming connections. The daemon default is 1024 # -c 1024
# Lock down all paged memory. Consult with the README and homepage before you do this # -k
# Return error when memory is exhausted (rather than removing items) # -M
# Maximize core file limit # -r
# Use a pidfile -P /var/run/memcached/memcached.pid
(base) sv@sv-NF5280M5:/home/sv$ memcached -h memcached 1.5.22 -p, --port=<num> TCP port to listen on (default: 11211) -U, --udp-port=<num> UDP port to listen on (default: 0, off) -s, --unix-socket=<file> UNIX socket to listen on (disables network support) -A, --enable-shutdown enable ascii "shutdown"command -a, --unix-mask=<mask> access mask for UNIX socket, in octal (default: 700) -l, --listen=<addr> interface to listen on (default: INADDR_ANY) if TLS/SSL is enabled, 'notls' prefix can be used to disablefor specific listeners (-l notls:<ip>:<port>) -d, --daemon run as a daemon -r, --enable-coredumps maximize core file limit -u, --user=<user> assume identity of <username> (only when run as root) -m, --memory-limit=<num> item memory in megabytes (default: 64) -M, --disable-evictions return error on memory exhausted instead of evicting -c, --conn-limit=<num> max simultaneous connections (default: 1024) -k, --lock-memory lock down all paged memory -v, --verbose verbose (print errors/warnings whilein event loop) -vv very verbose (also print client commands/responses) -vvv extremely verbose (internal state transitions) -h, --helpprint this help and exit -i, --license print memcached and libevent license -V, --version print version and exit -P, --pidfile=<file> save PID in <file>, only used with -d option -f, --slab-growth-factor=<num> chunk size growth factor (default: 1.25) -n, --slab-min-size=<bytes> min space used for key+value+flags (default: 48) -L, --enable-largepages try to use large memory pages (if available) -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. -t, --threads=<num> number of threads to use (default: 4) -R, --max-reqs-per-event maximum number of requests per event, limits the requests processed per connection to prevent starvation (default: 20) -C, --disable-cas disable use of CAS -b, --listen-backlog=<num> set the backlog queue limit (default: 1024) -B, --protocol=<name> protocol - one of ascii, binary, or auto (default: auto-negotiate) -I, --max-item-size=<num> adjusts max item size (default: 1m, min: 1k, max: 1024m) -S, --enable-sasl turn on Sasl authentication -F, --disable-flush-all disable flush_all command -X, --disable-dumping disable stats cachedump and lru_crawler metadump -W --disable-watch disable watch commands (live logging) -Y, --auth-file=<file> (EXPERIMENTAL) enable ASCII protocol authentication. format: user:pass\nuser2:pass2\n -e, --memory-file=<file> (EXPERIMENTAL) mmap a file for item memory. use only in ram disks or persistent memory mounts! enables restartable cache (stop with SIGUSR1) -Z, --enable-ssl enable TLS/SSL -o, --extended comma separated list of extended options most options have a 'no_' prefix to disable - maxconns_fast: immediately close new connections after limit (default: enabled) - hashpower: an integer multiplier for how large the hash table should be. normally grows at runtime. (default starts at: 0) set based on "STAT hash_power_level" - tail_repair_time: time in seconds for how long to wait before forcefully killing LRU tail item. disabled by default; very dangerous option. - hash_algorithm: the hash table algorithm default is murmur3 hash. options: jenkins, murmur3 - no_lru_crawler: disable LRU Crawler background thread. - lru_crawler_sleep: microseconds to sleep between items default is 100. - lru_crawler_tocrawl: max items to crawl per slab per run default is 0 (unlimited) - no_lru_maintainer: disable new LRU system + background thread. - hot_lru_pct: pct of slab memory to reserve for hot lru. (requires lru_maintainer, default pct: 20) - warm_lru_pct: pct of slab memory to reserve for warm lru. (requires lru_maintainer, default pct: 40) - hot_max_factor: items idle > cold lru age * drop from hot lru. (default: 0.20) - warm_max_factor: items idle > cold lru age * this drop from warm. (default: 2.00) - temporary_ttl: TTL's below get separate LRU, can't be evicted. (requires lru_maintainer, default: 61) - idle_timeout: timeoutfor idle connections. (default: 0, no timeout) - slab_chunk_max: (EXPERIMENTAL) maximum slab size in kilobytes. use extreme care. (default: 512) - watcher_logbuf_size: size in kilobytes of per-watcher write buffer. (default: 256) - worker_logbuf_size: size in kilobytes of per-worker-thread buffer read by background thread, then written to watchers. (default: 64) - track_sizes: enable dynamic reports for'stats sizes'command. - no_hashexpand: disables hash table expansion (dangerous) - modern: enables options which will be default in future. currently: nothing - no_modern: uses defaults of previous major version (1.4.x) - ssl_chain_cert: certificate chain file in PEM format - ssl_key: private key, if not part of the -ssl_chain_cert - ssl_keyformat: private key format (PEM, DER or ENGINE) (default: PEM) - ssl_verify_mode: peer certificate verification mode, default is 0(None). valid values are 0(None), 1(Request), 2(Require) or 3(Once) - ssl_ciphers: specify cipher list to be used - ssl_ca_cert: PEM format file of acceptable client CA's - ssl_wbuf_size: size in kilobytes of per-connection SSL output buffer (default: 16)