Skip to content

v0.4.8rc2-dev33

Choose a tag to compare

@efschu efschu released this 23 Jun 15:29
· 24 commits to dev since this release

Engine-driven multi-group transfer optimizations (Round 3)

E. Delta-Store (prefix-based skip)

  • New COMMIT_STORE_GROUP_DELTA request: payload [key, instance_id, group_idx, skip_count, cpu_data]
  • Server stores chunks at offset [skip_count, ...] for the named group
  • Worker derives skip_count from the prior lookup's prefix hit count
  • For 100%-hit groups, the worker sends an empty blob and the server no-ops the storage write -- saving 14 GiB of zmq traffic on the re-run of a cached prompt
  • Opt-in via LMCACHE_MP_DELTA_STORE=1 (default ON; skip_count=0 is identical to legacy)

C. Async-IO MQ (callbacks)

  • MessagingFuture.add_done_callback() registers fn(result) to fire on set_result
  • Runs in the polling loop's thread without blocking worker threads on future.result(timeout=...)
  • Exceptions in callbacks are swallowed (one bad callback would otherwise kill the polling loop)

G. Background-Prefetch (LRU predictor)

  • PrefetchPredictor module: LRU of (key, hit_count, total_chunks) tuples
  • Wired into EngineDrivenTransferContext as self._prefetch_predictor
  • Heuristic: most-recently-used key != current is the predicted next
  • Useful for chat-session style workloads; same-prompt re-run is already covered by L1

F. Storage Batched Append (observability)

  • Added _STATS_FILE_OPS counter in the server's commit paths
  • Tracks per-server storage write invocations
  • Helps operators verify when the 4-file-per-multi-group-store pattern is being hit
  • The actual batched-append optimization would require a new storage backend API (not implemented -- savings <2ms)

Carried from dev31

  • torch.save wire format (~2x faster than pickle.HIGHEST_PROTOCOL)
  • Multi-Stream D2D opt-in via LMCACHE_MP_MULTI_STREAM_D2D=1
  • Backward-compatible deserializer (auto-detect format)

Built on: 2026-06-23T15:29:36Z
Base: v0.4.8rc2.dev31