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.txtMake 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 ondemandEnter the offline training directory and compile the sampler.
cd offline_training
./build.shModify 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.pypython gen_features.py && python gen_dataset.pyTrain power and performance prediction models:
python train_mlp.py power
python train_mlp.py performanceCopy 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.shModify configuration file "config.json".
Launch online tuning service:
OMP_NUM_THREADS=1 python online_tuning.py config.json