Skip to content

Need to consider snapshot locality during assignment, and do local caching #52

Closed as duplicate

Description

@thockin

NIC bandwidth is finite. As we scale up the number of turnovers per second, we will exhaust that bandwidth with snapshots.

We will need to manage NIC usage explicitly. When we take a snapshot, we might have to keep it locally for a while. We need to do something like:

  • Publish that we have snapshot X on this node
  • When a request comes in for actor A which needs snapshot X:
    • route it to a worker on a node which has snapshot X if possible
    • If not possible, see if the data exists in the backing store (meaning any node can restore)
    • If so pick any worker
    • If not, park the request and retry

Depending on how fancy we need to get we might notify the storage on the node that does have the snapshot that it should move that upload to the front of the queue.

Activity

  1. Cali0707 commented on May 26, 2026

    @Cali0707

    Tim Hockin (@thockin) I think one approach to tackling this is (divided into separate PRs):

    1. Add node-level snapshot caching with lazy upload to storage. On suspend, snapshots are retained in a local node cache and enqueued for a background upload (rate limited to manage bandwidth). The ResumeActor flows check the node cache (e.g. /run/ateom-gvisor/snapshot-cache) before falling back to pulling from the network. Snapshots are only eligible for eviction once they've been uploaded
    2. Cache aware routing with valkey by storing which nodes currently cache which snapshots and modifying the scheduler to prioritize scheduling actors on nodes with cache hits
    3. Once we have this in place and can profile it on workloads, look at park and retry instead of cache miss in the case where there are no available workers on a node that has a cached snapshot

    Does this approach sound reasonable to you? If so, I'm happy to proceed with PRs

  2. thockin commented on May 31, 2026

    @thockin
    CollaboratorAuthor

    I think you're on the right track. Let's merge this discussion with #119 which has a lot more details that are related. Also #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureAn enhancement / feature request or implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions