GreenQueue — Carbon-Aware AI Job Scheduler
Inspiration
Major cloud providers have committed to operating on 24/7 carbon-free energy by 2030. However, most machine learning workloads today are scheduled without awareness of real-time grid carbon intensity.
Grid emissions fluctuate hour by hour depending on the fuel mix. A workload launched at one time may run on fossil-heavy generation, while the same workload a few hours later could run primarily on renewables.
We asked:
If compute can wait, should it wait for cleaner energy?
GreenQueue bridges the gap between software scheduling and the physical electrical grid.
What It Does
GreenQueue forecasts grid carbon intensity and schedules flexible workloads in the cleanest available time window.
Users specify:
- GPU count
- Workload type
- Priority class
- Maximum delay (1–24 hours)
The scheduler scans the forecast horizon and returns the three lowest-carbon start times. Users may schedule optimally or run immediately. In both cases, carbon impact is quantified.
How We Built It
Real-Time Grid Carbon Calculation
We integrated the U.S. Energy Information Administration (EIA) API to retrieve hourly fuel-type generation data.
Carbon intensity is computed as:
$$ CI = \sum_{i=1}^{n} p_i \cdot EF_i $$
Where:
- ( p_i ) = proportion of generation from fuel source ( i )
- ( EF_i ) = emission factor (gCO(_2)/kWh)
Machine Learning Forecasting
We trained a Gradient Boosting Regressor to predict the next 24 hours of carbon intensity.
Features include:
- Hour of day
- Day of week
- Month
- Sinusoidal encodings for diurnal cycles
$$ \sin\left(\frac{2\pi h}{24}\right), \quad \cos\left(\frac{2\pi h}{24}\right) $$
The model retrains periodically and persists to disk for fast inference.
GPU Energy and CO₂ Model
Energy consumption is estimated as:
$$ E_{\text{kWh}} = \frac{P_{\text{TDP}} \cdot N_{\text{GPU}} \cdot T_{\text{hours}}}{1000} $$
Where:
- ( P_{\text{TDP}} = 300W )
- ( N_{\text{GPU}} ) = number of GPUs
- ( T_{\text{hours}} ) = runtime duration
Carbon emissions per job:
$$ CO_2 = CI \cdot E_{\text{kWh}} $$
Carbon savings from intelligent scheduling:
$$ \Delta CO_2 = CO_{2,\text{naive}} - CO_{2,\text{smart}} $$
This enables per-job and cumulative carbon accounting.
Green Window Optimization
Given a flexibility window, the scheduler evaluates each possible start time within the horizon and ranks them by predicted carbon intensity.
Instead of FIFO scheduling, the system solves a carbon-aware optimization problem over the forecast window.
GEAS — Live Carbon-Aware Process Scheduling
We implemented a live OS-level scheduler that manages real processes.
Definitions:
- ( GI ): Greenness Index (scaled inverse of carbon intensity)
- ( I ): Task intensiveness (EWMA-smoothed CPU usage)
- ( TI ): Total intensiveness across running tasks
Scheduling constraints:
$$ I \leq GI $$
$$ TI < k \cdot GI $$
If grid conditions worsen, high-intensity processes are paused using SIGSTOP and resumed later using SIGCONT.
Challenges
External API Reliability
Handling latency and failure cases required asynchronous requests, timeout handling, and a synthetic mock data fallback.
Forecast Stability
Capturing strong diurnal cycles required explicit time encoding and careful feature engineering.
Safe Process Preemption
Ensuring system stability required EWMA smoothing and global CPU load monitoring.
Custom Visualization
All charts were built using the HTML5 Canvas API without third-party libraries.
What We Learned
- Sustainability can be framed as a scheduling optimization problem.
- Small per-job savings compound significantly at scale.
- Robust engineering is as critical as algorithmic intelligence.
- Carbon-aware orchestration can reduce emissions without requiring developers to modify their workloads.
GreenQueue demonstrates that intelligent coordination between machine learning, real-time grid data, and operating system scheduling can meaningfully reduce the carbon footprint of AI workloads.
Built With
- aiosqlite
- css3-backend:-fastapi
- custom-carbon-aware-scheduler-(geas)-frontend-&-visualization:-vanilla-javascript
- html5
- html5-canvas-api-(custom-chart-rendering)-architecture:-async-rest-api
- httpx-machine-learning:-scikit-learn-(gradientboostingregressor)
- javascript-(es6+)
- languages:-python-3.13
- linux-signals-(sigstop-/-sigcont)
- numpy-database:-sqlite-apis-&-data:-u.s.-energy-information-administration-(eia)-api-v2-system-&-process-management:-psutil
- pandas
- pydantic
- real-time-forecasting
- sqlalchemy-2.0-(async)
- uvicorn
Log in or sign up for Devpost to join the conversation.