Trading idle multi-core CPU cycles for lower physical DRAM and snapshot headroom has explicit physical boundaries: across structured payloads and large collections, Engula 2.3.0 reduces physical used_memory_rss by 40%–75%, whereas workloads dominated by tiny strings, high-entropy encrypted bytes, or frequent in-place byte-range mutations gain little or no memory while paying extra lookup or decompression CPU.
Reviewing the tables below before running an offline audit filters out misfit clusters in under 5 minutes.
| Workload & Schema Profile | Expected Physical Memory & Operational Impact | Recommendation |
|---|---|---|
| >= 256 B structured payloads (JSON, text Protobuf, user sessions, profiles, AI feature context) | Batch-trained shared dictionaries + compact records cut physical RSS by 40%–75% and shrink BGSAVE CoW spikes from +86% to +18% under 50k ops/s sustained random overwrites |
Strong Fit (Primary Target) |
| Multi-field Hash, large Set, and List collections (>= 16 B field/member size) | Eliminates per-field/per-member heap nodes and allocator rounding, paired with 2.3.0 batched HMGET prefetching |
Strong Fit |
| Large Sorted Sets (100k–10M+ members) & UUID-suffixed keys | Upstream Valkey community B+ tree cuts 2M-member ZSET footprint from 90–94 B to 51–55 B/member; 36-char UUID suffixes save 18.0 B/key | Strong Fit |
| Fleets dominated by <= 64 B tiny strings or numeric counters | Fixed compact-record and block-index headers raise per-key RSS to 1.38× stock at 8–64 B (inverting to 0.64× / -36% at 256 B) | No-Go for String Compression (keep stock Valkey / Redis 7.2, or set engula-disable-string yes) |
| Pre-encrypted, pre-compressed, or raw unquantized FP32 dense float vectors | High-entropy bytes lack dictionary redundancy (~5%–10% outer metadata savings only; -14% saturated GET ceiling) |
Use only if fast block fullsync / CoW reduction is required; otherwise keep stock |
Heavy in-place SETRANGE, APPEND, or SETBIT mutations on >= 1 KB compressed strings |
Mutating a compressed record requires full decompression and rewrite into an active block | Avoid on compressed strings (rewrite whole keys via SET or set engula-disable-string yes) |
5-Minute Empirical Check: Run ValueSight locally offline against a masked
dump.rdbbackup to compute exact per-typeused_memory_rsssavings before deploying a single node.
All measurements below compare engula-enable-earena yes vs. no inside the exact same Engula 2.3.0 binary pinned to 4 physical cores (io-threads 4), measured by OS used_memory_rss:
| Anti-Fit Pattern | Controlled Benchmark Result | Root Cause & Recommended Configuration |
|---|---|---|
| 1. <= 64 B tiny strings | 200k keys (16 B key names): 8 B and 64 B values consume 1.38× stock RSS (47 B vs. 34 B and 121 B vs. 88 B), crossing into 0.64× (-36% savings) at 256 B | Compact record headers and block-location slots carry ~15 B more fixed overhead than tiny inline strings. Hash and Set entries are guarded by engula-earena-min-value-size 16, whereas String has no minimum floor; keep pure tiny-string clusters on stock or set engula-disable-string yes |
| 2. Incompressible random / encrypted bytes (no snapshot need) | 60k × 4 KB random bytes: used_memory_rss is 242 MB vs. 249 MB (flat), while 4-thread saturated GET throughput runs 14% slower (428k vs. 500k ops/s) |
Zero cross-key byte redundancy exists for dictionary compression while reads pay one extra block-index lookup. Skip compression unless native block snapshots are desired for CoW containment |
3. High-frequency in-place SETRANGE / APPEND on compressed strings |
16 B in-place edits on compressible 4 KB strings: SETRANGE runs 81% slower (99,950 vs. 533,333 ops/s; P99 1.151 ms vs. 0.167 ms) and APPEND runs 79% slower |
Compressed blocks are immutable; partial updates must decompress the entire 4 KB value and append a new record (SETBIT behaves similarly). Switch hot partial updates to full-key SET or set engula-disable-string yes |
Before promoting a cluster to production, verify these six operational trade-offs and apply their standard mitigations:
| ID | Trigger Scenario | Measured Controlled Behavior | Standard Production Mitigation |
|---|---|---|---|
| KC-01 | Full-collection scans & length introspection (HGETALL, SMEMBERS, HSCAN, STRLEN, GETRANGE) |
Single-thread HGETALL on 1 KB-field large Hashes runs 82% slower; HSCAN materializes on the main thread (88% slower at 4 threads); STRLEN / GETRANGE decompress the full record (78%–82% slower) |
Replace hot-path HGETALL / HSCAN on large Hashes with batched HMGET field fetches (5.2× prefetch-accelerated in 2.3.0) |
| KC-02 | Read decompression CPU & single-thread write fallback | Decompressing a 4 KB GET spends 11.8 µs vs. 5.2 µs server CPU (0.45× saturated 4-core pure-read ceiling); misconfiguring io-threads 1 under sustained 80% writes triggers synchronous compression stalls (P99 6.9 ms) |
Retain >= 35% multi-core CPU headroom at peak load after shard consolidation, and always configure io-threads >= 2 (4 or 8 recommended) |
| KC-03 | Giant single EVAL / MULTI write batches under replication or AOF |
With an attached replica, active replication backlog (3,600 s), or AOF, uncompressed command arguments are retained until script/transaction commit. Writing 150,000 × 4 KB keys in one EVAL spikes transient RSS to 1,125 MB before settling to 57 MB (17.7× transient peak) |
Chunk bulk Lua or MULTI / EXEC writes into batches of a few thousand keys, or use standard client pipelining |
| KC-04 | Drop-budget refusal exit code 1 & wrapper-loop blind spots | If validated RDB startup detects corruption exceeding engula-rdb-validate-max-drop-ratio (default 100 ppm, 128-record floor), the server preserves the RDB and exits with code 1; wrapping it in a zero-backoff shell loop hides restarts |
Run exec engula-server directly as container PID 1 and alert on sustained unready pods and refusal logs (see Go-Live Checklist) |
| KC-05 | Mixed-engine traditional RDB fullsync & AOF rewrite I/O | Streaming standard REDIS0011 RDB to a stock Redis 7.2 / Valkey replica (~1.7× pure-stock duration) and BGREWRITEAOF (48.5 s vs. 30.4 s under 50k ops/s, though CoW drops 2,520 MB → 208 MB) require per-key decompression and re-encoding |
Stagger stock replicas separately from native Engula replicas during mixed rollouts, and provision sequential disk bandwidth on AOF-enabled hosts |
| KC-06 | Uncompressed hot-block bit-flips & 64 KiB OS page size | Sealed compressed blocks carry full checksums (Fail-Stop on mismatch), whereas active plaintext write blocks rely on hardware memory integrity; 64 KiB-page ARM64 kernels coarsen page-release granularity | Deploy on ECC-equipped servers with HA replicas, and benchmark steady-state used_memory_rss on target 64 KiB-page OS images before sizing |
Run these three read-only INFO commands against your live Redis or Valkey instance to screen command ratios and CPU headroom in seconds:
Once cleared, proceed to Migrating from Redis / Valkey for offline ValueSight sizing and read-only shadow-replica validation.