NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Towards VM Rescheduling Optimization Through Deep Reinforcement Learning

Xianzhong Ding, Yunkai Zhang, Binbin Chen, Donghao Ying, Tieying Zhang, Jianjun Chen, Lei Zhang, Alberto Cerpa, Wan Du · DOI

TL;DR

VMR2L is a deep reinforcement learning framework designed to optimize virtual machine (VM) rescheduling in large-scale data centers. By combining a two-stage action framework with a novel sparse attention mechanism, it achieves resource utilization comparable to near-optimal mathematical solvers but delivers solutions in seconds rather than minutes, making it practical for dynamic, real-world cloud environments.

What Problem Does This Paper Address?

In modern data centers, virtual machines are constantly created and released. This churn leaves behind "resource fragments"—small pockets of CPU and memory on physical machines (PMs) that are too small to host new, larger VM requests. To reclaim this wasted space, data centers perform VM Rescheduling (VMR), migrating active VMs to different PMs to consolidate free resources.

The challenge lies in the trade-off between speed and quality. Traditional Mixed Integer Programming (MIP) solvers can find near-optimal solutions but take minutes or even hours to run. In a live data center, the state of the system changes so rapidly that a 50-minute-old solution is often invalid by the time it's finished. Conversely, simple heuristics are fast but leave significant resources wasted. The authors identify a critical "five-second limit" for inference time to ensure solutions remain relevant in dynamic environments.

Figure 3. VMR process. The red number 2 highlights the off-peak period when VMR is typically performed.

Methods

The authors developed VMR2L, a Reinforcement Learning (RL) system tailored for the unique constraints of rescheduling:

  • Two-Stage Framework: Instead of picking a (VM, destination PM) pair simultaneously—which creates a massive action space—VMR2L first selects a VM to move and then selects the best destination PM. This allows the system to efficiently mask out illegal moves (e.g., PMs without enough space) and handle complex service constraints like anti-affinity.
  • Sparse Attention Mechanism: Standard neural networks struggle to capture the hierarchical relationship between PMs and the VMs they host. VMR2L uses a customized Transformer architecture with "sparse local-attention," allowing VMs to first "attend" to their host PM and neighbors before considering the wider cluster.
  • Risk-Seeking Evaluation: Because the rescheduling environment is deterministic (we know exactly what happens if we move a VM), the system can sample multiple potential migration paths in parallel and simply deploy the one that yields the best final resource consolidation.
  • Deterministic Simulator: The authors built an OpenAI Gym-compatible simulator that allows the agent to train offline using historical data center traces, avoiding the need for risky live-system interaction during training.

Datasets

The study utilizes two large-scale datasets collected from real industry data centers at ByteDance:

  1. Medium Dataset: Up to 2,089 VMs and 280 PMs.
  2. Large Dataset: Up to 4,546 VMs and 1,176 PMs.

These datasets include various workload intensities (Low, Middle, High) and have been anonymized and open-sourced to serve as a benchmark for the research community.

Key Insights and Ideas

  • Inference Time is a Performance Metric: Unlike static optimization problems, the "goodness" of a VMR solution is tied to how fast it is generated. As shown in the paper's motivation experiments, even an "optimal" solver performs poorly in practice if its latency exceeds a few seconds.
  • The "Elbow Point": The authors identified that for their specific data center traces, the benefit of complex optimization drops off sharply if the solution takes longer than 5 seconds to compute.
  • Generalization Power: A key "aha" moment was discovering that an RL agent trained on a specific cluster size and workload can generalize to different cluster sizes and abnormal workloads without retraining, outperforming traditional methods that require manual tuning for each new scenario.
The "Elbow Point" shows that solution quality degrades rapidly if inference takes longer than 5 seconds.

Key Results

  • Near-Optimal Performance: VMR2L achieved a fragment rate (FR) within 2.86% of the optimal MIP solution.
  • Massive Speedup: While the MIP solver required over 50 minutes to reach a solution for 50 migrations, VMR2L generated a high-quality trajectory in just 1.1 seconds.
  • Scalability: On the "Large" dataset (over 4,500 VMs), VMR2L maintained its edge, solving mappings in under 4 seconds while baselines struggled to scale.
  • Constraint Handling: The two-stage framework successfully managed "anti-affinity" constraints (ensuring specific VMs aren't on the same PM for reliability) even when conflict ratios were artificially high.
Figure 4. FR and inference time at different MNLs.

Limitations and Future Work

  • Sequential Migration: Currently, the agent migrates VMs one by one. The authors suggest that allowing the agent to "swap" multiple VMs simultaneously could unlock even better migration paths.
  • Predictive Rescheduling: The current model reacts to the present state. Future iterations could incorporate VM runtime estimates to move VMs that are likely to stay active for a long time, further reducing future fragmentation.
  • Training Objectives: While the risk-seeking approach is used during evaluation, the authors believe integrating it directly into the training phase (risk-seeking training) could further improve the agent's policy.

Summary updated

BibTeX
@inproceedings{ding2025towards,
  author = {Xianzhong Ding and Yunkai Zhang and Binbin Chen and Donghao Ying and Tieying Zhang and Jianjun Chen and Lei Zhang and Alberto Cerpa and Wan Du},
  title = {{Towards VM Rescheduling Optimization Through Deep Reinforcement Learning}},
  booktitle = {EuroSys},
  year = {2025},
  doi = {10.1145/3689031.3717476},
}
Figure