EcoFloc has been made possible thanks to Technopôle Domolandes1, an organization deeply committed to innovation and the development of the Landes region in France and beyond, as well as the Université de Pau et des Pays de l'Adour and Université de Toulouse. These institutions are engaged in advancing research and development in France, contributing significantly to technological progress and regional growth. Their continuous efforts have been instrumental in bringing this project to life.
EcoFloc is a comprehensive and versatile tool developed by the R&D laboratory of Technopôle Domolandes1, supported by Université de Pau et des Pays de l'Adour and Université de Toulouse.
EcoFloc measures the energy consumption of applications in GNU/Linux environments across several hardware components. In this initial release, it enables independent energy measurement for the CPU, GPU, RAM, storage devices (SD), and network interface controllers (NIC). The tool measures energy at predefined intervals during a specified timeout, allowing users to create detailed energy profiles based on hardware components and behavioral patterns over time. It also features long-term monitoring capabilities, tracking energy usage over extended periods, even if applications are closed and reopened.
EcoFloc calculates the energy consumption for each hardware component based on the load generated by running processes, identified by their PID. It utilizes load and energy data sourced from GNU/Linux kernel interfaces or, if unavailable, from the hardware components' specifications (datasheets), which can be either predefined or customized
In this initial release, EcoFloc includes a set of pre-defined mathematical formulas tailored for the five hardware components 2. Developers and contributors have the flexibility to define and maintain their own formulas if needed.
Future versions will incorporate additional mathematical approaches and kernel-level interfaces like RAPL3, enabling users to select options that best meet their needs.
It is important to note that, like any software tool measuring hardware energy consumption, EcoFloc's results are approximations and should not be considered absolutely precise.
In this initial version of EcoFloc, each hardware component—CPU, RAM, SD, GPU, and NIC—is managed by an independent module. You can find and modify the source code and configuration files in their respective folders, each named ecofloc-*
.
EcoFloc requires an Arch-based or Debian-based GNU/Linux distribution with the Linux kernel version 5.12 or higher. Please, refer to each module folder to explore specific requirements.
To use EcoFloc, execute the ecofloc
command as root with the following options.
- Process ID (PID) (
-p
): The process identifier to analyze. - Application Name (
-n
): The name of the application to measure (comprises all associated PIDs). - Total Analysis Time (
-t
): Specifies the measurement duration. Entering a negative value allows for ongoing analysis, which can be terminated and results displayed by pressingCtrl+C
. - Measurement Interval (
-i
): Determines the interval at which EcoFloc takes load and power measurements. Please consider that small interval values can lead to CPU overload. - Dynamic Mode (
-d
): Enables EcoFloc to evaluate applications that may be closed and reopened during the analysis. - Export Mode (
-f
): Exports the measurement results to a CSV file at the path specified in thesettings.conf
file. The file will include, for each measured interval: the measurement time, the concerned PID, the average power, and the energy consumed.
After executing ecofloc
, the following output will be displayed:
- Average Power (in Watts): The mean power consumption over the total analysis time.
- Energy Consumption (in Joules): Total energy used during the total analysis time.
To install EcoFloc, run the following command in your terminal as root:
/bin/bash ecofloc_installer.sh
This script requires Python3 to be installed on your system. It installs both the EcoFloc console application and a user interface that can be executed with the ecoflocUI
command.
To compile and install the EcoFloc project on your system, follow these steps:
- Open your terminal.
- Navigate to the root directory of the FLOC project:
- Use the
cd
command to change to the project directory.
- Use the
- Compile the project and manage installations:
- Execute
make clean
to delete all executable files from the local folder. - Execute
make
to compile the project and install FLOC, making it ready for use. - Use
make uninstall
to remove FLOC from your system. - Use
make install
to copy FLOC onto your system, allowing it to be used as a common GNU/Linux command.
- Execute
To use EcoFloc and specify which application to execute, run:
./floc --cpu -p or -n [PID or App Name] -i [interval] -t [duration] -d -f
./floc --sd -p or -n [PID or App Name] -i [interval] -t [duration] -d -f
./floc --nic -p or -n [PID or App Name] -i [interval] -t [duration] -d -f
./floc --ram -p or -n [PID or App Name] -t [duration] -d -f
./floc --gpu -p or -n [PID or App Name] -t [duration] -d -f
To analyze the process with PID 20300 for 10 seconds at an interval of 1000 milliseconds for the CPU, use the following command:
./ecofloc --cpu -p 20300 -i 1000 -t 10 -f
This command will output the results in the console in the following format:
*****************************
/ECOFLOC_RAM_PID_20300
*****************************
Average Power (CPU): 0.47 Watts
Total CPU Energy (CPU): 4.72 Joules
*****************************
Additionally, the -f
flag configures EcoFloc to write each interval's analysis to a CSV file specified in the features.conf
file. In each row, the values are: PID, average power in this interval in Watts, and energy consumed in Joules in this interval.
To analyze the Chrome application (all its PIDs) at an interval of 1000 milliseconds indefinitely (t
is a negative number) until the user presses Ctrl+C for the GPU, use the following command:
./ecofloc --gpu -n chrome -i 1000 -t -1 -d
Note that the -d
option makes EcoFloc continue running even if chrome
is closed. When this happens, EcoFloc will wait until Chrome is reopened.
This command will output the results in the console in the following format:
*****************************
/ECOFLOC_SD_COMM_chrome
*****************************
Average Power (GPU): 1.98 Watts
Total GPU Energy (GPU): 39.6 Joules
*****************************
Footnotes
-
[Têchnopole Domolandes](https://www.domolandes.fr ↩ ↩2
-
Humberto, A.V.H.: An energy-saving perspective for distributed environments: Deployment, scheduling and simulation with multidimensional entities for Software and Hardware. Ph.D. thesis, UPPA, https://www.theses.fr/s342134 (2022) ↩
-
Running Average Power Limit (RAPL): Intel® 64 and IA-32 Architectures Software Developer's Manual, specifically in the section detailing power and thermal management. ↩