Skip to content

atelet: Hardlink durable-dir data out of a local checkpoint - #1514

Open
Chenyi Wang (chw120) wants to merge 1 commit into
agent-substrate:mainfrom
chw120:atelet-hardlink-checkpoints
Open

atelet: Hardlink durable-dir data out of a local checkpoint#1514
Chenyi Wang (chw120) wants to merge 1 commit into
agent-substrate:mainfrom
chw120:atelet-hardlink-checkpoints

Conversation

@chw120

Copy link
Copy Markdown
Collaborator

Staging a local checkpoint for a restore byte-copied every file the snapshot named. The durable-dir data is typically the bulk of it -- it is the actor's own files -- and nothing after staging writes it: ateom extracts the tar into the durable-dir mount and re-archives from that mount, into a different directory, at the next checkpoint. The copy therefore spent a second full write of the actor's data on every restore from a local checkpoint, and left that many dirty pages behind for the guest's first flush to queue against.

Hardlink that file instead, and keep copying everything else. The distinction is the guest memory image: it is the one staged file a restore can write through, and a shared inode would carry that write back into the local checkpoint, which is the source of truth for every restore after this one. The check is an allow-list so that a snapshot file nobody has classified yet gets the safe treatment, and a failed link falls back to a copy, since two directories on different filesystems is a node's layout rather than a fault.

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Staging a local checkpoint for a restore byte-copied every file the
snapshot named. The durable-dir data is the largest of them -- it is the
actor's own files -- and nothing after staging writes it: ateom extracts
the tar into the durable-dir mount and re-archives from that mount, into
a different directory, at the next checkpoint. The copy therefore spent
a second full write of the actor's data on every restore and left that
many dirty pages behind for the guest's first flush to queue against.

Hardlink that file instead, and keep copying everything else. The
distinction is the guest memory image: it is the one staged file a
restore can write through, and a shared inode would carry that write
back into the local checkpoint, which is the source of truth for every
restore after this one. The test is an allow-list so that a snapshot
file nobody has classified yet gets the safe treatment, and a failed
link falls back to a copy, since the two directories sitting on
different filesystems is a node's layout rather than a fault.
@chw120
Chenyi Wang (chw120) force-pushed the atelet-hardlink-checkpoints branch from 8bcfe95 to 1005853 Compare September 5, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant