Skip to content

Overall Energy Measurement

Measurement on the Frontend Node

The power measurements are performed on the frontend node.

To run a measurement, simply run the command:

board boardX measure

By replacing X by the number of the measurement platform or by replacing boardX by its short name, according to the following table (see the Summary Table for more details):

Board Full Name Short Name Board no
Jetson AGX Xavier xagx 1
Jetson Xavier Nano xnano 2
VIM1S vim1s 3
Banana Pi F3 bpif3 4
Odroid-XU4 xu4 5
Raspberry Pi 4 Model B rpi4 6
Orange Pi 5 Plus opi5 7
Jetson AGX Orin oagx 8
Jetson Orin Nano onano 9

Warning

We noticed that the calibration of boards 2, 3, 5, 6, 7, 8 & 9 might be wrong (around 20% of error). A new calibration will be achieved early in September 2024. Boards 1 & 4 have been calibrated recently (07/2024).

Info

Note that some of the SBCs are not powered by a measurement platforms. Thus, it is not possible to measure the overall energy/power on these SBCs.

Output file of the command board boardX measure is structure as followed:

cal_data: cal_data 3489 0.4980 3637 1.0000 3946 2.0030 3905 4.7130 3374 5.0110 3584 12.011 3409 20.024
cr 3489 ca 0.498000
cr 3637 ca 1.000000
cr 3946 ca 2.003000
cr 3905 ca 4.713000
vr 3374 vv 5.011000
vr 3584 vv 12.011000
vr 3409 vv 20.024000
cal_data selected: 3905.000000 4.713000, 3409.000000 20.024000
  0 0.795356 18.927303 15.053953
  0 0.847254 18.932138 16.040325
  0 0.806219 18.932959 15.264104
  0 0.805012 18.932983 15.241274
  0 0.899151 18.931101 17.021919
  0 1.097085 18.921268 20.758240
  0 0.931738 18.924576 17.632742
  0 1.019842 18.922813 19.298286
  0 0.825529 18.938446 15.634242
...

The measures are on the lines starting with two spaces and a bit (here set to 0) which can be used to profile an application during its evaluation. First float value is intensity (A), second value is voltage (V) and third one is instantaneous power (W).

Use GPIOs to identify specific part in a benchmark

Measuring a specific part in a benchmark (e.g. a function) can be achieve using GPIO pins connected between the compute node and the measurement board. At least one pin should be connected on each board, with a maximum of 8 GPIOs allowing 256 values, and are located in the /sog/gpio/ directory.

To identify a specific part you have to write 1 in the corresponding pin file at the beginning and 0 at the end.

In the example given below, a benchmark executes three functions and the consumption is measured for the complete run. Thanks to the GPIO it is possible to identifiy the consumption of a small part of it.

void do_stuff();
void my_specific_stuff();
void my_benchmark(int gpio_fd)
{
    do_stuff();
    size_t r = write(gpio1_fd, "1", 1);
    my_specific_stuff();
    r        = write(gpio1_fd, "0", 1);
    do_stuff();
}

int main(int argc, char** argv)
{
    int gpio1_fd = open("/sog/gpio/pin1","w");
    my_benchmark(gpio1_fd);
    close(gpio1);
    return 0;
}