Steve HutchinsonBig Pines
·3 min read·Scaling the Cognitive Substrate

Tiered Storage and Cost Control

Running everything in high-performance vector databases gets expensive at scale. Not all memories deserve the same storage cost. How I use hot, warm, and cold tiers to control costs without compromising retrieval quality.

Running everything in high-performance vector databases gets extremely expensive as you scale.

Not all memories are equally important or frequently accessed. There is no reason to store every low-value memory at the same cost and speed as the most critical operational knowledge.

The Three Tiers

Hot tier - recent and high-trust memories. These live in full-performance OpenSearch with HNSW-accelerated vector indexes. They handle the overwhelming majority of retrieval traffic and need to respond in milliseconds. This is the most expensive tier.

Warm tier - important memories that are accessed less frequently. Standard OpenSearch without the premium HNSW indexing. Retrieval is slower but still acceptable for memories that are not in the critical hot path.

Cold tier - archived or low-value memories. Object storage (S3 or equivalent), retrieved only when explicitly requested or during periodic full corpus analysis. Very cheap, meaningfully slower.

The OpenSearch index schema for experience_events already includes the fields that drive tier assignment decisions. Note the multi-lane embedding architecture - three different embedding models indexed simultaneously, plus the decay and reinforcement fields that determine how long a memory stays hot:

// packages/memory-opensearch/src/schemas.ts

export const experienceEventsSchema = {
  settings: {
    index: {
      knn: true,
      number_of_shards: 3,
      number_of_replicas: 1,
      'knn.algo_param.ef_search': 100,
    },
  },
  mappings: {
    properties: {
      event_id: { type: 'keyword' },
      timestamp: { type: 'date' },
      summary: { type: 'text', analyzer: 'english' },

      // Primary embedding (default 1536d, configurable via EMBEDDING_DIMENSION)
      embedding: knnVectorField(),

      // Multi-lane: quality (Qwen, 1024d), efficient (Nomic, 768d), hybrid (BGE-M3, 1024d)
      embedding_qwen: knnVectorField(QUALITY_EMBEDDING_DIM),
      embedding_nomic: knnVectorField(EFFICIENT_EMBEDDING_DIM),
      embedding_bge_m3: knnVectorField(HYBRID_EMBEDDING_DIM),

      // Tier assignment signals
      importance_score: { type: 'float' },
      retrieval_count: { type: 'integer' },
      retrieval_priority: { type: 'float' },
      decay_factor: { type: 'float' },
      reinforcement_score: { type: 'float' },

      tags: { type: 'keyword' },
    },
  },
}

The HNSW vector fields (knn_vector, FAISS engine, m: 16, ef_construction: 128) are the expensive part. A memory in the hot tier has all four vector lanes indexed and immediately queryable. Moving it to warm or cold means deciding which lanes to keep and which to drop - a tradeoff between retrieval quality and storage cost.

How Movement Works

Tier assignment is automatic and based on three signals:

Recency - how long since this memory was last retrieved? Memories that have not been accessed in a configurable window get demoted to the next tier.

Trust score - high-trust memories resist demotion longer. A memory with a strong trust score stays in the hot tier even if it has not been retrieved recently, because it is likely to be valuable when it is eventually needed.

Retrieval frequency - memories that get retrieved frequently stay hot regardless of age.

Promotion works in reverse: a cold-tier memory that suddenly becomes relevant gets a retrieval frequency boost and promotes automatically.

The Retrieval Experience

From the query path's perspective, the tiers are largely transparent. The retrieval layer queries the hot tier first, falling back to warm if the hot results are insufficient, and only touching cold for explicit historical queries or corpus analysis runs.

Most queries never reach warm, let alone cold. The hot tier handles the overwhelming majority of retrieval traffic because it contains the memories that actually matter.

The Cost Reality

The cost reduction at scale is significant. The target is roughly 80% of memories in cold storage, 15% in warm, and 5% in hot. The retrieval quality impact is minimal because the memories that matter most - recent, high-trust, frequently accessed - are exactly the ones that stay in the hot tier.

Managing cost at scale is just as important as managing performance. Tiered storage is how to do both.

Next up from memory

Ranked from series and tags, warmed by what the substrate is keeping salient across readers.

Accept to save reading progress, unlock continue-where-you-left-off, and allow a hosting-support ad at the end of posts. Anonymous session signals still help the live memory panels; we never publish reader IDs.