FCUFS is an open source framework for saving energy consumption with controllable performance loss. FCUFS operates at fixed intervals, sensing performance characteristics, predicting performance and power for the next timeframe, and adjusting frequencies based on prior predictions. It is transparent to workloads, tuning both oncore and uncore frequencies at the core level, thereby reducing energy consumption while controlling performance loss.
Ensure you have Python 3.8.
Install the required Python dependencies using pip:
pip install -r requirements.txt
Make sure you have root permissions. Disable intel_pstate and set power mode to "ondemand" governor with the following commands.
echo passive | sudo tee /sys/devices/system/cpu/intel_pstate/status
cpupower frequency-set -g ondemand
Enter the offline training directory and compile the sampler.
cd offline_training
./build.sh
Modify the benchmark paths, frequency steps, node information and other configurations in lines 14-34 of collect_data.py according to the comments.
Run the data sampling script:
OMP_NUM_THREADS=1 python collect_data.py
python gen_features.py && python gen_dataset.py
Train power and performance prediction models:
python train_mlp.py power
python train_mlp.py performance
Copy trained models to online_tuning directory:
cp ./*CUFS.pth ../online_tuning/trained_model/
Enter the online tuning directory and compile the sampler.
cd ../online_tuning
./build.sh
Modify configuration file "config.json".
Launch online tuning service:
OMP_NUM_THREADS=1 python online_tuning.py config.json