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

Learning Virtual Machine Scheduling in Cloud Computing through Language Agents

JieHao Wu, Ziwei Wang, Junjie Sheng, Wenhao Li, Xiangfeng Wang, Jun Luo · DOI

Abstract

Cloud providers face significant challenges in optimizing virtual machine (VM) placement due to the highly dynamic and nonstationary nature of workloads. This paper introduces MiCo, a hierarchical framework that leverages Large Language Models (LLMs) to automate the design of specialized scheduling heuristics. By treating scheduling as a Semi-Markov Decision Process with Options, MiCo employs an "Option Miner" to generate scenario-specific Python code and an "Option Composer" to select the optimal strategy based on real-time context. Experimental results on large-scale real-world datasets show that MiCo achieves a 96.9% performance ratio relative to the offline optimal, significantly outperforming state-of-the-art reinforcement learning methods.

Introduction

The Online Dynamic Multidimensional Bin Packing (ODMBP) problem is central to cloud resource management. It involves packing sequential VM requests into physical machines (PMs) while balancing multiple resource dimensions (e.g., CPU, RAM) and accounting for VM deletions. A primary hurdle is nonstationarity: the distribution of VM sizes and lifetimes shifts unpredictably over time.

Workload nonstationarity in the Huawei-East-1 dataset across VM requests, durations, and ratios.

Traditional heuristics like "Best-Fit" lack the adaptability required for these shifts, while Reinforcement Learning (RL) models often struggle with generalization and lack interpretability.

Methods

MiCo addresses these challenges by using LLMs as "heuristic designers" rather than direct solvers. The framework operates in a hierarchical manner grounded in the Semi-Markov Decision Process with Options (SMDP-Option).

The MiCo framework architecture, illustrating the hierarchical process from scenario generation to context-aware scheduling.

1. Option Miner (The Specialist)

The raw request stream is partitioned into contextually coherent "scenarios." For each scenario, the Option Miner uses an LLM to iteratively evolve Python code for a scheduling heuristic. It "mines" specialized strategies that work best for specific workload patterns, such as bursts of small VMs.

2. Option Composer (The Manager)

Once a library of specialized policies is created and pruned for redundancy, the Option Composer uses an LLM to develop a "master policy." This policy analyzes the recent history of VM requests (the context) and decides which specialist heuristic to activate for the current window of time.

Datasets and Evaluation

The researchers evaluated MiCo using two major real-world datasets:

  • Huawei-East-1: A trace spanning one year with approximately 125,000 VM requests, characterized by high nonstationarity.
  • AzurePublicDatasetV2: A subset of 200,000 requests used to validate robustness and transferability.

Key Results

  • Near-Optimal Performance: MiCo achieved a 96.9% performance ratio on the Huawei dataset, where 100% represents the theoretical offline optimal solution.
  • Superiority over RL: MiCo outperformed SchedRL (a state-of-the-art RL approach) by 11.1% in mean performance. In complex scenarios with heterogeneous workloads, the gap widened to 32.6%.
  • Interpretability: The LLM-generated code is human-readable. The system independently "rediscovered" classic bin-packing principles and invented innovative strategies like "multi-threshold relaxation curves."

Conclusion and Future Work

MiCo demonstrates that LLMs can effectively automate the design of complex system heuristics, maintaining interpretability while gaining the flexibility to adapt to shifting global patterns. While the discovery phase involves significant LLM API costs, the execution is nearly instantaneous. Future work will focus on multi-objective optimization, including energy consumption and Service Level Agreements (SLAs).

Summary updated

BibTeX
@misc{wu2025learning,
  author = {JieHao Wu and Ziwei Wang and Junjie Sheng and Wenhao Li and Xiangfeng Wang and Jun Luo},
  title = {{Learning Virtual Machine Scheduling in Cloud Computing through Language Agents}},
  year = {2025},
  eprint = {2505.10117},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.10117},
}
Figure