Deep RL Job Scheduling — Makespan Minimization
Optimizing single-machine job scheduling to minimize makespan using Proximal Policy Optimization (PPO)
Empirical benchmark comparing INT8 Post-Training Quantized ONNX against vanilla TorchScript C++ tracing.
01 // SYSTEM OVERVIEW
Job scheduling is an NP-hard combinatorial optimization challenge ubiquitous in cloud compute clusters, manufacturing pipelines, and CPU execution queues. This project trains a Deep Reinforcement Learning agent using Proximal Policy Optimization (PPO) in a custom Gymnasium environment to dynamically dispatch queued jobs and minimize total makespan.
02 // THE PROBLEM & ENGINEERING SIGNIFICANCE
Traditional heuristics like FCFS (First-Come, First-Served) and SJF (Shortest Job First) perform well on static queues but fail to optimize complex non-linear arrival sequences where future job distributions are uncertain.
Minimizing makespan directly reduces computing cluster operational costs and maximizes resource utilization.
- •Designing a state representation that encodes both current machine state and variable-length queue properties.
- •Preventing the RL policy from converging to suboptimal myopic actions.
- •Benchmarking against theoretical and empirical scheduling baselines.
03 // DATA PIPELINE & PREPROCESSING
- Observation space normalization (job duration divided by max duration bound)
- Masking invalid actions for finished or empty queue slots
- Reward shaping to penalize idle processor time and total elapsed makespan
04 // SYSTEM ARCHITECTURE & DATA FLOW
Custom JobSchedulingEnv (Gymnasium) <-> Stable-Baselines3 PPO Agent <-> Policy Network (MlpPolicy) <-> Baseline Comparator (FCFS/SJF) <-> Gantt Chart Visualizer.
Simulates job queue arrival, machine state, and step reward calculation.
Multi-layer perceptron policy learning dynamic job selection probabilities.
Runs parallel episodes with FCFS and SJF algorithms for direct performance comparison.
Plots comparative execution timelines for qualitative schedule validation.
05 // MODEL ENGINEERING & HYPERPARAMETERS
Trained over 200,000 timesteps with vectorized environments.
- • Learning Rate: 3e-4
- • n_steps: 2048
- • batch_size: 64
- • gamma: 0.99
- • clip_range: 0.2
06 // FAILURE ANALYSIS & ZERO-TRUST SAFEGUARDS
- • Out-of-distribution job sizes exceeding the maximum normalized observation ceiling.
- • Rapid bursts of identically-sized jobs where all actions have equal expected return.
07 // PRODUCTION DEPLOYMENT SPECS
08 // ARCHITECTURAL DECISIONS & TRADE-OFFS
09 // PLANNED IMPROVEMENTS & NEXT REVISIONS
- →Expand environment to multi-machine heterogeneous cluster scheduling.
- →Incorporate attention-based Graph Neural Networks (GNNs) for variable-length job queue representations.