KeyLiaoHPC / FCUFS

A transparent energy optimization toolset based on core-level on-core and un-core frequency tuning on Intel CPUs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FCUFS - Fine-grained Core and Uncore Frequency Scaling

Introduction

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.

Dependency

Ensure you have Python 3.8.

Install the required Python dependencies using pip:

pip install -r requirements.txt

Usage

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

Offline training

Enter the offline training directory and compile the sampler.

cd offline_training
./build.sh

Step 1. Sampling performance events

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

Step 2. Processing data

python gen_features.py && python gen_dataset.py

Step 3. Training

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/ 

Online tuning

Enter the online tuning directory and compile the sampler.

cd ../online_tuning
./build.sh

Launch online tuning service

Modify configuration file "config.json".

Launch online tuning service:

OMP_NUM_THREADS=1 python online_tuning.py config.json

About

A transparent energy optimization toolset based on core-level on-core and un-core frequency tuning on Intel CPUs.

License:GNU General Public License v3.0


Languages

Language:Python 73.0%Language:C 23.4%Language:Shell 3.6%