S
Supanote
Sign in Sign up

Memcached 1.6.34+ extstore Hybrid RAM + NVMe Flash Config

plain (ini) 1 day ago · 29 lines · 4 views
Verified Blueprint Memcached 1.6.34+

Scale Memcached capacity 5-10x at fraction of DRAM cost using 1.6.34+ extstore NVMe flash tiering, segmented LRU, and slab_automove.

  • ✓ Keeps compact hash table & item headers in DRAM while streaming values >= 1KB onto fast NVMe storage
  • ✓ Benefits from Memcached 1.6.34+ deterministic LRU-tail page eviction and extstore_memory_pressure metrics
  • ✓ Disables UDP (-U 0) and enables dynamic slab page reassignment against slab calcification
Quick Fetch
1# Memcached 1.6.34+ Hybrid DRAM + NVMe Flash (extstore) Systemd Environment
2# Place in /etc/sysconfig/memcached or /etc/default/memcached
3# Architecture: 16 GB RAM (keys, headers & hot small items) + 128 GB dedicated NVMe file
4
5PORT="11211"
6USER="memcached"
7MAXCONN="8192"
8# 16384 MB DRAM ceiling for hash table, metadata headers, and items < ext_item_size
9CACHESIZE="16384"
11# Security & Networking: Disable UDP (-U 0), bind internal interface, 8 worker threads
12# Extended (-o) options:
13# modern = Segmented HOT/WARM/COLD LRU +slab_reassign +lru_crawler +lru_maintainer
14# slab_automove=1 = Automatically move 1MB pages across slab classes as item sizes shift
15# ext_path = Dedicated NVMe file path & capacity (pre-create directory on local XFS/ext4 NVMe)
16# ext_item_size=1024 = Offload values >= 1 KB to NVMe; keep tiny counters/flags purely in DRAM
17# ext_wbuf_size=8 = 8 MB sequential write buffer (minimizes SSD write amplification)
18# ext_threads=6 = Dedicated async disk reader/writer threads
19# ext_compact_under=4 = Compact sparse flash pages when free fragments exceed threshold
20OPTIONS="-l 127.0.0.1 -U 0 -t 8 -o modern,slab_automove=1,ext_path=/var/lib/memcached-nvme/extstore.bin:128G,ext_item_size=1024,ext_wbuf_size=8,ext_threads=6"
22# --- Live Health & Headroom Telemetry (run via socat / nc) ---
23# printf "stats extstore
24quit
25" | nc -U /run/memcached/memcached.sock || nc 127.0.0.1 11211
26# Watch:
27# extstore_memory_pressure (target < 80%; 100% means RAM header headroom is full)
28# extstore_bytes_used / extstore_page_evictions / extstore_io_queue

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Related Memcached 1.6.34+ & Database, Cache & SQL Blueprints

Production-ready configurations and diagnostics from the verified Supanote library.

All Database, Cache & SQL →
Interactive Developer Workbench: .env, Log & API Key Secret Scanner

Detect and redact leaked AWS keys, JWTs, database URIs, private keys, and Bearer tokens before sharing.

Open Secret Scanner →

Share Note

Open
Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification