Manuscript Offprint
arXiv:2610.05554RetainZ: Reclaim-Time-Aware Placement for AI Checkpoints on Zoned SSDs
Minxing Chu Ruoxi Yang
Harvard University
Brown University
Tufts University
Cambridge, MA, USA
Providence, RI, USA
Medford, MA, USA
minxing_chu@{g.harvard.edu, brown.edu}
Abstract—Solid State Drives (SSDs) are becoming the dominant medium for performance-critical storage. Zoned Namespace (ZNS) SSDs are getting more and more attractive because sequential writes and explicit zone resets reduce address-mapping, over-provisioning, and internal garbage-collection costs. However, reclaiming space requires resetting an entire zone, so deleting one file does not free its space while other files there must be kept. This erase-before-write constraint becomes a bottleneck for write-intensive workloads, particularly AI checkpointing during model training, where frequent saves of model and optimizer state compete for space with long-retained checkpoints. We observe that retention policies inherently encode when data can be retired, avoiding the need for a learned lifetime predictor. We present RetainZ, a storage backend that translates these policies into explicit reclaim epochs. Its allocator isolates long-retained data and groups objects with nearby reclaim epochs, balancing delayed space reclamation against unused space at zone ends. Evaluated on FEMU with multi-tenant streams and checkpoint manifests up to Pythia-1B, RetainZ reduces space occupied by deleted data and unused zone tails by 41.7% and mean per-input checkpoint p99 latency by 47.5% at 84% target load compared with the allocator of ZenFS, an established lifetime-aware ZNS backend, and lowers host write amplification from 1.165 to 1.003.
Index Terms—Zoned SSDs, checkpointing, retention semantics, data placement, garbage collection, cross-layer optimization.
I. INTRODUCTION AND MOTIVATION
The demand for high bandwidth and low latency has made Solid State Drives (SSDs) a mainstream component of modern data centers [1]. However, delivering that performance through a conventional block interface incurs costs that arise from how flash stores data. NAND flash is programmed in pages but erased in blocks. As a result, supporting arbitrary overwrites requires address translation, spare capacity, and garbage collection that copies valid data before erasure. These overheads limit sustained write performance and reduce the storage capacity available to applications.
Zoned Namespace (ZNS) SSDs offer an attractive way to reduce these overheads. The interface partitions the logical address space into zones and requires sequential writes within each zone. Host software selects the zone for each write and must reset an entire zone before reusing its written space. This division of responsibility reduces the SSD controller's memory requirements and the capacity reserved for internal management, while reducing I/O delays caused by device-side garbage collection under sustained write-intensive workloads [2].
However, reclaiming entire zones becomes costly when files with different lifetimes are stored together. Deleting a short-
Code and reproducibility artifacts: https://github.com/DonaldLucy/RetainZ.
Checkpoint C1
Created: Epoch 1
Retires: Epoch 7
Size: 60% zone
Hint: medium
Checkpoint C2
Created: Epoch 2
Retires: Epoch 13
Size: 40% zone
Hint: medium
Checkpoint C3
Created: Epoch 3
Retires: Epoch 7
Size: 40% zone
Hint: short
Checkpoint C4
Created: Epoch 8
Retires: Epoch 13
Size: 60% zone
Hint: medium
Data distribution across zones after C4 is saved at Epoch 8
ZenFS-Alloc: 2 occupied zones
C2
C3 deleted
unused
C4
unused
Deleted + unused space = 1 zone
RetainZ: 1 occupied zone
C1 + C3 reset at Epoch 7
C2
C4
No deleted or unused space
Checkpoint runtime
retention events
RetainZ backend
allocation + journal
ZNS namespace
write / read / reset
Fig. 1. RetainZ retains the same live data in fewer occupied zones.
lived file does not free its space if another file in the same zone must be retained. To reclaim that space, the backend must wait until the remaining files can be deleted or copy them elsewhere before resetting the zone. As the device fills, the shortage of free zones and the bandwidth spent on copying can significantly delay incoming writes. This constraint is particularly relevant to AI checkpointing during model training. Frequent saves of model and optimizer state generate large, mostly sequential writes [3]. Recent recovery checkpoints are replaced as training progresses, while selected snapshots are retained much longer. Therefore, the backend must support rapid turnover of large files alongside long-retained data, making timely space reclamation essential for successive saves.
Prior work provides complementary optimizations at the training-runtime and storage levels. At the runtime level, these optimizations reduce training pauses and storage traffic during checkpoint creation. CheckFreq shortens these pauses by allowing checkpoint state copying and storage writes to proceed concurrently with training computation. It also adjusts the number of training iterations between saves to keep checkpoint overhead within a target budget [4]. FastPersist writes checkpoint data to multiple SSDs in parallel and allows independent training computations to continue during these writes [5]. Reducing saved data also lowers this overhead. Check-N-Run uses differential checkpointing to save modified model state and quantization to represent saved values with fewer bits [6].
At the storage level, prior work improves file placement and zone reclamation to reduce the cost of recovering usable space . Placing files expected to be deleted at similar times in the same zone leaves less live data to copy when that zone is reclaimed. ZenFS, a RocksDB storage backend for ZNS SSDs, groups files using coarse lifetime hints that distinguish short-lived from longer-lived data . Prophet
This work has been submitted to IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.
estimates when individual database files will be deleted and groups files with similar predicted deletion times [11].
However, these methods do not explicitly use the runtime retention rules that determine when a checkpoint can be deleted to guide placement. Our key insight is that, for AI checkpointing, the training runtime can provide these deletion conditions before checkpoint data are written. The conditions follow directly from the runtime's retention policy, which specifies the events that make each generation eligible for deletion. Exposing them to the storage backend allows it to choose which generations share zones according to their retirement conditions, grouping data that can be reclaimed together.
Training frameworks such as Megatron and TorchTitan support policies that retain a limited number of recent checkpoint generations [12], [13]. Under a policy that keeps the three most recent completed generations, generation 17 becomes eligible for deletion once generation 20 has been durably saved. The runtime can specify this condition when generation 17 is created and pass it to the storage backend with the write request. Using these retirement conditions effectively requires balancing timely reclamation with efficient use of zone capacity. Assigning each generation to separate zones makes its space independently reclaimable, but can leave unused space at zone ends and consume the device's limited active-zone slots. Sharing zones improves packing, yet combining generations with distant retirement events delays space reuse.
We present RetainZ, a zoned storage backend that connects runtime retirement conditions to zone placement and reclamation. Figure 1 compares RetainZ with the ZenFS allocator (ZenFS-Alloc), illustrating how grouping checkpoints that retire together allows entire zones to be reclaimed without relocating live data. RetainZ implements this principle through an explicit runtime-storage contract and an online allocator that balances reclamation delay against unused space at zone ends.
A. From retention rules to reclaim hints
When creating a checkpoint, the runtime supplies its birth epoch a on the checkpoint workload's logical timeline, shard sizes, and a reclaim hint d. We define this hint as the epoch associated with the runtime event that makes the generation eligible for deletion under its retention policy. Under a latest-K policy, which retains the K most recent completed generations, generation g becomes eligible for deletion when generation has been durably committed. Checkpoints selected for long-term retention beyond this window are referred to as milestones. RetainZ represents them as anchors with , indicating that no retirement epoch is specified. For a declared checkpoint cadence c, latest-K retention gives on the shared logical timeline, allowing cross-stream comparison of policy-derived reclaim hints.
The backend uses these hints to guide placement and tracks durable commit and deletion events to determine when space can be reclaimed. A generation’s stored extents remain live until the runtime explicitly deletes the generation and the deletion is durably recorded. When no live extents remain in a zone, the backend can reset that zone and reuse its capacity.
B. Accounting for reclamation delay and unused space
With reclaim hints available, the allocator needs a way to compare the capacity costs of different placements. An occupied zone can hold little live data because much of its contents have been deleted or because it was never filled. RetainZ accounts for both sources of overhead and how long they persist. Let and denote written and live bytes in a zone of capacity . Deleted data occupy bytes, and the unwritten tail occupies bytes. Over an observation interval of checkpoint epochs, their combined cost is
The first term accumulates dead-byte time (DBT), while the second accounts for unused tails over the same interval. Dividing B by CT gives the mean capacity reserved beyond live data, expressed in units of zone capacity. Subsequent appends can fill a writable tail and reduce this overhead. FINISH prevents further appends to the zone, so any remaining tail stays unavailable until RESET.
To guide an individual write, RetainZ compares the incoming reclaim hint with those of the data already written to a candidate zone. For finite hints, let denote the maximum reclaim hint among the extents written to that zone. Appending bytes with hint changes this maximum to . The marginal DBT cost computed from these hints is
The first term charges the incoming bytes for waiting beyond their own retirement epoch. The second charges the zone's existing written bytes for extending the maximum reclaim hint from D to . This includes bytes that are invalid, because postponing RESET also prolongs their occupation of the zone. RetainZ combines this marginal cost with a tail-capacity term to approximate (1), so that avoiding retirement mismatch does not simply leave more zones partially filled.
C. Selecting zones for incoming writes
RetainZ keeps anchors in separate zones so that checkpoints with finite reclaim hints can be reclaimed independently of them. Anchor placement favors zones with less unused capacity after the write. For finite hints, the allocator first limits the spread of retirement epochs within a zone and then compares the capacity costs of the resulting candidates.
For an incoming checkpoint with birth epoch a and finite reclaim hint d, the retention horizon is . Each zone holding finite hints maintains their minimum m, maximum D, and the shortest retention horizon H among its written extents.
(a) Runtime-to-storage interface

(b) Candidate placements (max. 4 epochs apart)
(c) Placement cost
Fig. 2. RetainZ architecture and zone selection.
RetainZ sets a base span constraint using the shorter retention horizon:
For a generation of padded size , the allocator uses the larger of the limit in (3) and . This admits a wider range of retirement epochs when several small generations can fit in one zone, improving opportunities to fill unused tails. When generations are deleted at their declared epochs, the resulting span bounds the interval between the first and last deletion, limiting how long deleted data wait for the zone to become reclaimable.
Among compatible zones and available empty zones, the allocator uses the cost model to decide where to write next. For a shard with aligned bytes remaining, a candidate can receive bytes and is assigned the score
The first term accounts for the additional waiting caused by combining retirement epochs, as defined in (2). The second expresses the remaining tail capacity in byte-epochs, making it comparable to . Its weight grows with h because capacity reserved by checkpoints with longer retention horizons can remain unused for longer. An empty zone has and , so its score reflects the capacity left unused after accepting the write. The allocator selects the lowest score, breaking ties in favor of the zone with fewer host RESETs. If a shard spans multiple zones, the allocator repeats this selection for its remaining bytes. Figure 2(b)–(c) shows an example with and for all occupied candidates, yielding a four-epoch span limit.
Device resource limits create an additional reason to use existing tails. Opening an empty zone at the active-zone limit requires finishing an active zone, which can strand its remaining tail. When no candidate is available under the normal placement rule, RetainZ can relax the span constraint to fill existing tails while continuing to keep anchors separate from data with finite hints. The same cost function ranks these fallback candidates. This trades a wider spread of retirement epochs for access to capacity already available in occupied zones. Section IV further examines how checkpoint size and zone resource limits affect these placement decisions.
III. ONLINE BACKEND AND EVALUATION METHOD
We implement RetainZ in C++17 to evaluate how its placement decisions affect space reuse and checkpoint performance. The backend combines direct I/O, a durable journal, and cached per-zone hint summaries. Our primary baseline is ZenFS-Alloc, a port of the upstream ZenFS data-file allocator [10]. Equal-epoch best-fit receives the same reclaim hints as RetainZ but groups matching retirement epochs during normal placement; ablations remove either cost term or the span constraint. All policies replay identical workloads and share the I/O path, journal, copying GC, and zone-resource budgets. The pressure sweep reserves one empty zone for GC. Additional controls use a common admission rule that fills compatible tails and borrows the reserved zone only when the remaining padded checkpoint data fit in it.
Experiments run on FEMU [14] under QEMU CPU emulation. The pressure sweep uses a 256-MiB namespace with 4-MiB zones, leaving one open and six active zones for data after shared resource reservations. Four synthetic streams combine latest-K retention with staggered saves and nominal checkpoint sizes of 0.74–2.27 zone capacities. Each input requests 250 saves at a minimum 100-ms start-to-start interval. Resident anchors set the target peak live occupancy after scheduled deletions to 70–90%. We complement these controlled workloads with model-derived experiments. Capacity tests replay original Pythia-1B checkpoint shard lengths using verifiable pattern bytes on 64–256-GiB namespaces [15]. These runs use lossless compressed backing, while latency and real-payload recovery tests use DRAM backing. Real-payload tests write SmolLM2-135M checkpoints captured during CPU training with PyTorch Distributed Checkpoint (DCP), using retention events from the upstream Megatron and TorchTitan routines [12], [13], [16], [17]. After backend recovery, DCP reloads model, AdamW, and RNG state. We compare the restored state and next training update with a reference run.
We report reserved overhead , host write amplification (WA; host-written bytes per logical checkpoint byte), and backend p99 latency (request handling through durable commit, excluding serialization). Synthetic metrics exclude prefill and the first 20 epochs. Pressure results show means and min-max across three seeds, averaging per-input p99.
IV. MEASURED BEHAVIOR
Placement Effectiveness. RetainZ sustains checkpoint writes with lower capacity overhead and less copying. Figure 3 shows results under increasing capacity pressure with a fixed GC reserve. At 84% load, RetainZ reduces reserved overhead from 6.53 to 3.80 zones relative to ZenFS-Alloc, host WA
ZenFS-Alloc
RetainZ
(a) Completed checkpoints (%)

(b) Host write amplification

(c) Reserved overhead (zones)
(d) Checkpoint p99 (ms)


Target peak live load (%)
Fig. 3. FEMU results with a fixed GC reserve.
(a) Cached summaries
Allocation time (ms/commit)

(b) Hint precision
Reserved overhead (zones)

(c) Admission
Host write amplification
Fig. 4. Mechanism controls for RetainZ.
from 1.165 to 1.003, and checkpoint p99 latency from 85.3 to 44.8 ms. RetainZ avoids live-data copying at this load, whereas ZenFS-Alloc requires foreground migration on some commits. At 90% load, RetainZ completes 250 saves per input, while ZenFS-Alloc exhausts capacity after 40–49 saves.
With common admission, both allocators complete all requested saves on the same 90%-load inputs. Figure 4(c) shows that RetainZ still reduces mean host WA from 1.514 to 1.214. Its placement therefore reduces copying even when both policies have sufficient headroom to complete each replacement.
Ablation and Sensitivity. Table I examines where these gains come from under common admission. Invalid and Tail separate reserved overhead into deleted data and unused zone tails. The placement ablations average five matched inputs; the remaining controls average three new inputs. With identical reclaim hints, RetainZ reduces reserved overhead by 34.1% relative to equal-epoch best-fit at 84% load, showing the benefit of choosing zone sharing through both reclamation and packing costs. Removing the tail term leaves more unused capacity, while removing the DBT term leaves more invalid data. Isolating every generation exhausts capacity in this workload.
The span constraint trades some packing efficiency for less invalid data trapped in occupied zones. Removing it lowers total overhead at 84% load and in the delayed-deletion and extended-retention tests at 80% load. At 90% load, retaining the constraint reduces mean host WA by 4.9%, as tighter capacity makes copying more costly. Size adaptation helps recover packing efficiency for small checkpoints: across five matched inputs at 70% load, it reduces reserved overhead by 11.5% relative to the same allocator without size adaptation.
Figure 4(b) examines hint precision in the fixed-reserve sweep. At 84% load, rounding finite hints upward to 4- and 16-epoch grids increases reserved overhead from 3.80 to 4.53 and 4.99 zones, respectively, while checkpoint sizes and actual deletion events remain unchanged. More precise hints allow the allocator to distinguish retirement events that coarse hints group together. The final block of Table I tests zone size and resource budgets. Scaling zones from 4 to 64 MiB, with namespace and checkpoint sizes increased proportionally, preserves RetainZ's advantage: reserved overhead and p99 latency are 43.4% and 38.2% lower than ZenFS-Alloc's. With one data-open slot, increasing the data-active budget from 6 to 14 and 30 slots leaves RetainZ's overhead near 3.86 zones. ZenFS-Alloc selects fresh zones more often as additional slots become available, increasing fragmentation and copying.
TABLE I PLACEMENT QUALITY AND SENSITIVITY.
| Policy or setting | Invalid (zones) | Tail (zones) | Host WA | (ms) |
|---|---|---|---|---|
| Placement and ablations, 84% load | ||||
| ZenFS-Alloc | 3.66 | 3.11 | 1.153 | 79.8 |
| Equal-epoch best-fit | 2.96 | 2.82 | 1.045 | 63.4 |
| DBT only | 1.61 | 3.61 | 1.014 | 48.4 |
| Tail only, same span | 2.35 | 2.10 | 1.007 | 46.9 |
| No span constraint | 1.69 | 1.88 | 1.003 | 43.9 |
| RetainZ | 1.11 | 2.70 | 1.003 | 43.6 |
| Span control: RetainZ / no span | ||||
| 90% load | 3.54/3.95 | 1.00/0.64 | 1.189/1.251 | 119.5/127.7 |
| Small checkpoints | 0.81/1.83 | 2.04/1.64 | 1.008/1.008 | 16.8/15.8 |
| Delayed deletion | 1.41/1.89 | 2.99/2.36 | 1.003/1.003 | 45.7/39.8 |
| Extended retention | 2.17/3.05 | 3.30/2.18 | 1.003/1.004 | 42.2/44.4 |
| Scale/resources: RetainZ / ZenFS-Alloc | ||||
| 4 MiB, 6 active | 1.06/3.68 | 2.79/3.13 | 1.003/1.123 | 40.3/72.5 |
| 4 MiB, 14 active | 1.11/3.99 | 2.75/4.85 | 1.003/1.644 | 40.7/158.1 |
| 4 MiB, 30 active | 1.11/6.34 | 2.75/3.66 | 1.003/2.080 | 37.9/202.7 |
| 64 MiB, 6 active | 1.06/3.68 | 2.79/3.13 | 1.000/1.120 | 517.2/836.5 |
Allocation Overhead and Recovery Validation. Cached zone summaries make these placement decisions inexpensive. Figure 4(a) shows: at 70% load, replacing full-history scans with cached summaries reduces mean allocation cost from 5.996 to 0.270 ms per commit, including summary maintenance, while preserving placement decisions and write traffic. Measured allocator metadata totals 430.2 KiB for both RetainZ and ZenFS-Alloc. Both allocators complete the 64-GiB capacity trials using original Pythia-1B shard lengths under common admission, with readback verifying every retained byte. SmolLM2-135M payload tests additionally verify recovery through DCP under both Megatron and TorchTitan retention policies. DCP restores model, AdamW, and RNG state, and the next training update matches the reference loss, parameters, and optimizer state. Recovery also succeeds in process-crash tests at commit, relocation, and FINISH boundaries.
V. CONCLUSION
RetainZ turns checkpoint retention policies into placement information for zoned storage. By carrying retirement conditions from the runtime to the backend, it coordinates zone sharing with reclamation while accounting for unused capacity. Therefore, application semantics can guide storage decisions before data are written, allowing placement and space reuse to be designed together throughout each checkpoint's lifecycle.
REFERENCES
[1] S. Han, P. P. C. Lee, F. Xu, Y. Liu, C. He, and J. Liu, "An in-depth study of correlated failures in production SSD-based data centers," in USENIX Conference on File and Storage Technologies (FAST), 2021, pp. 417–429. [Online]. Available: https://www.usenix.org/conference/fast21/presentation/han
[2] M. Bjørling, A. Aghayev, H. Holmberg, A. Ramesh, D. Le Moal, G. R. Ganger, and G. Amvrosiadis, "ZNS: Avoiding the block interface tax for flash-based SSDs," in USENIX Annual Technical Conference (ATC), 2021, pp. 689–703. [Online]. Available: https://www.usenix.org/conference/atc21/presentation/bjorling
[3] V. Sistla, Y. Niu, H. Basudan, and S. Devabakhthini, “Architecting scalable checkpoint storage for large-scale ML training on AWS,” Jun. 2025. [Online]. Available: https://aws.amazon.com/blogs/storage/architecting-scalable-checkpoint-storage-for-large-scale-ml-training-on-aws/
[4] J. Mohan, A. Phanishayee, and V. Chidambaram, “CheckFreq: Frequent, fine-grained DNN checkpointing,” in USENIX Conference on File and Storage Technologies (FAST), 2021, pp. 203–216. [Online]. Available: https://www.usenix.org/conference/fast21/presentation/mohan
[5] G. Wang, O. Ruwase, B. Xie, and Y. He, “FastPersist: Accelerating model checkpointing in deep learning,” 2024. [Online]. Available: https://arxiv.org/abs/2406.13768
[6] A. Eisenman, K. K. Matam, S. Ingram, D. Mudigere, R. Krishnamoorthi, K. Nair, M. Smelyanskiy, and M. Annavaram, “Check-N-Run: A checkpointing system for training deep learning recommendation models,” in USENIX Symposium on Networked Systems Design and Implementation (NSDI), 2022, pp. 929–943. [Online]. Available: https://www.usenix.org/conference/nsdi22/presentation/eisenman
[7] J. Kim, D. Kim, J. Seong, H. Han, and S. Kang, “Lifetime-aware zone allocation for ZNS SSDs,” in IEEE International Conference on Fog and Edge Computing (ICFEC), 2026, pp. 89–90.
[8] F. S. Chowdhury, S. S. Eusuf, S. Sarkar, and T. I. Papon, “ZARC: Re-inventing zone allocation for LSMs on ZNS SSD,” in International Workshop on Data Management on New Hardware (DaMoN), 2026. [Online]. Available: https://www.cs.umb.edu/~tpapon/pdfs/zarc_damon_cr.pdf
[9] K. Han, H. Gwak, D. Shin, and J. Hwang, “ZNS+: Advanced zoned namespace interface for supporting in-storage zone compaction,” in USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2021, pp. 147–162. [Online]. Available: https://www.usenix.org/conference/osdi21/presentation/han
[10] Western Digital, “RocksDB with ZenFS,” 2026, accessed September 26, 2026. [Online]. Available: https://zonedstorage.io/docs/applications/zenfs
[11] G. Liu, C. Yang, Q. Yu, C. Guo, W. Xia, and Z. Cao, “Prophet: Optimizing LSM-based key-value store on ZNS SSDs with file lifetime prediction and compaction compensation,” in 38th International Conference on Massive Storage Systems and Technology (MSST), 2024. [Online]. Available: https://www.msstconference.org/MSST-history/2024/Papers/msst24-3.1.pdf
[12] NVIDIA, “Megatron-LM: Checkpointing implementation,” 2026, revision d113016, accessed September 26, 2026. [Online]. Available: https://github.com/NVIDIA/Megatron-LM/blob/d113016bb2850c4b7d804f24ba72c055d7d4f861/megatron/training/checkpointing.py
[13] PyTorch, “TorchTitan: Checkpointer retention policy,” 2026, revision 35ceeb5, accessed September 26, 2026. [Online]. Available: https://github.com/pytorch/torchtitan/blob/35ceeb5901e6ffe6a0a3ecd4c4e6e9e80cbc853e/torchtitan/components/checkpointer/base.py
[14] H. Li, M. Hao, M. H. Tong, S. Sundararaman, M. Bjørling, and H. S. Gunawi, “The CASE of FEMU: Cheap, accurate, scalable and extensible flash emulator,” in USENIX Conference on File and Storage Technologies (FAST), 2018, pp. 83–90. [Online]. Available: https://www.usenix.org/conference/fast18/presentation/li
[15] S. Biderman, H. Schoelkopf, Q. Anthony, H. Bradley, K. O'Brien, E. Hallahan, M. A. Khan, S. Purohit, U. S. Prashanth, E. Raff, A. Skowron, L. Sutawika, and O. van der Wal, "Pythia: A suite for analyzing large language models across training and scaling," 2023. [Online]. Available: https://arxiv.org/abs/2304.01373
[16] L. Ben Allal et al., “SmolLM2: When smol goes big—data-centric training of a small language model,” 2025. [Online]. Available: https://arxiv.org/abs/2502.02737
[17] PyTorch, “Distributed checkpoint,” 2025, experiments use PyTorch 2.8.0. [Online]. Available: https://docs.pytorch.org/docs/2.8/distributed.checkpoint.html