DeepScale is a predictive power management system that uses deep reinforcement learning to dynamically set per-core CPU frequencies based on system-wide VM activity. Unlike traditional DVFS strategies that react to individual core utilization, DeepScale proactively learns workload patterns across VMs to minimize energy usage while maintaining performance.
- ⚡ Predictive DVFS: Learns when workload phases change and adjusts frequency ahead of time.
- 🧠 Deep Q-Learning: Uses system-wide CPU metrics to choose energy-optimal frequencies.
- 📉 Energy-Aware: Incorporates RAPL energy readings into its reward function.
- 🔁 Online Training Loop: Learns continuously during benchmarks via reinforcement signals.
- 📊 Trace Logging: Exports a
.jsonllog of system metrics and actions for later analysis.
master.py- Main experiment driver (setup, run, destroy)vm_manager.py- Starts, pins, provisions, and benchmarks VMshost_metrics_daemon.py- Logs CPU stats and RAPL energycpu_dqn.py- Deep Q-Network for learning and frequency controlcloud-init/- VM bootstrap configsvm_benchmark_scripts/- Redis benchmark startup scriptslogs/- Output logs and metric traces
1. Setup Phase (Creates and provisions VMs):
sudo python3 -u master.py setup | tee logs/master.log2. Run Phase (Starts benchmark, collects metrics, performs DQN control):
sudo python3 -u master.py run | tee logs/master.log3. Cleanup Phase (Stops and removes VMs):
sudo python3 -u master.py destroy | tee logs/master.log- metrics.jsonl: Per-core metrics + energy per second
- logs/master.log: VM creation, benchmarking, and DQN actions
- trained_model.h5: Checkpointed model state from DQN
Make sure you have the following installed:
sudo apt install qemu-kvm libvirt-daemon-system
pip install tensorflow numpy psutil paramiko scpBy default, PhaseScale provisions each VM with a YCSB benchmark running on Redis. You can configure this in vm_manager.py or by modifying the cloud-init configs.