arXiv:2609.37627cs.NISep 2026

Manuscript Offprint

arXiv:2609.37627

RingStitch: Demand-Aware Optical Stitching for Fragmented TPU Clusters

Huiru Ao, Fan Yang, Binglei Wang, Bo Liu, Jialong Li

Huiru Ao 1^{1}, Fan Yang 1^{1}, Binglei Wang 1^{1}, Bo Liu 1^{1}, Jialong Li 1,⊗^{1,\otimes}

1^{1} Faculty of Computer Science and Artificial Intelligence, Shenzhen University of Advanced Technology

✉lijialong@suat-sz.edu.cn

Abstract—Large-scale AI training clusters increasingly use optical circuit switching (OCS) to reconfigure rack-level interconnects and create elastic accelerator slices. In multi-tenant TPU-style clusters, however, small and medium jobs often leave partial free capacity stranded inside racks. Although the aggregate free capacity may be sufficient for a new job, it cannot be used by local placement or coarse full-rack stitching. This paper presents RingStitch, an OCS-based defragmentation scheduler that turns fragmented rack capacity into schedulable resources. RingStitch follows a local-first policy, stitches compact cross-rack fragments only when needed, and orders the selected racks into a low-cost logical ring. Simulations on a TPU 8t-like SuperPod model show that RingStitch improves schedulability over local and full-rack baselines. At 95% load on three fragmentation-heavy workloads, RingStitch improves utilization by up to 5.2 percentage points and reduces demand-weighted blocking ratio by up to 7.8 percentage points relative to Full-Rack Stitching. Its average and P95 waiting-time reductions reach 91.6% and 94.7%, respectively, while limiting cross-rack communication cost.

Index Terms—Optical circuit switching, TPU clusters, multi-tenant scheduling, resource fragmentation

I. INTRODUCTION

Large language models and multimodal foundation models increasingly rely on training clusters with thousands of AI accelerator chips. Google TPU systems are representative: TPU v4 introduced optically reconfigurable rack-level interconnects [1], and TPU 8t scales a SuperPod to 9600 TPU chips [2]. At this scale, scheduling depends not only on aggregate idle capacity, but also on whether the available chips can be assembled into an efficient training slice.

Optical circuit switching (OCS) adds a powerful placement primitive: a scheduler can select racks and configure optical links for a job-specific slice. This capability reflects a broader move toward datacenter networks whose connectivity adapts to demand [3]–[9]. In TPU-style systems, however, this flexibility can be restricted to coarse allocation units: a job either fits within one rack or receives a slice of fully available racks. This works when job size aligns with rack capacity, but it leaves residual capacity stranded when multi-tenant workloads partially occupy many racks.

We focus on this rack-level fragmentation problem. A cluster may have enough idle chips in aggregate, while no single rack and no set of fully free racks can host the job. The capacity exists, but it is unusable under the allocation granularity. Local First-Fit and Best-Fit are trapped by the single-rack boundary; full-rack stitching ignores partial free capacity; and naive cross-rack aggregation can scatter a job across distant racks and inflate communication cost. The scheduler should therefore recover stranded fragments without turning capacity gain into communication overhead.

Existing ML-cluster schedulers improve time sharing, job completion time, fairness, goodput, heterogeneity support, and network-aware placement [10]–[17]. These systems optimize how jobs share accelerators over time or where jobs should be placed under conventional cluster abstractions. They do not model OCS as a placement-time resource for stitching partial rack capacity into communication-aware training slices.

This paper presents RingStitch, an OCS-based defragmentation scheduler for multi-tenant TPU-style clusters. RingStitch treats partial free rack capacity as a first-class schedulable resource. It follows a local-first policy and invokes optical stitching only when local placement fails but aggregate residual capacity is sufficient. It then selects compact, fragment-aware rack sets, allocates chips with a fragment-first policy, and orders the selected racks into a low-cost logical ring. The result is a practical balance between resource utilization and communication efficiency.

The main contributions are as follows. First, we formulate rack-level residual fragmentation in OCS-enabled TPU clusters by distinguishing aggregate capacity from policy-feasible capacity. Second, we design RingStitch, which combines bounded candidate generation, fragment-first allocation, and topology-aware ring ordering under a lexicographic objective. Third, we evaluate RingStitch using a TPU 8t-like SuperPod simulator under diverse workloads.