Changes between Version 6 and Version 7 of Public/Energy


Ignore:
Timestamp:
Sep 28, 2020, 10:57:36 AM (4 years ago)
Author:
Alessio Netti
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Public/Energy

    v6 v7  
    11== Energy Measurement
    22
    3 For the CM and ESB modules there is a fine grained energy measurement in place using Megwares energy meters attached to the compute nodes of these modules.
    4 There are different ways to get information about energy consumption for your jobs (and the nodes). Preferred methods are:
     3For the CM and ESB modules there is fine-grained energy measurement in place using Megware's energy meters, attached to the respective compute nodes. In addition, the DCDB monitoring framework is deployed on the entire DEEP-EST prototype, providing a variety of sensor measurements in addition to energy consumption. There are different ways to get information about energy consumption for your jobs (and the nodes). Preferred methods are:
    54
    65=== SLURM sacctl command
    76
    8 This is probably the easiest way to get energy consumption for your interactive and batch jobs.  Once your job has finshed, you can use the
    9 `sacct` command enquire the Slurm database about its energy consumption. For further information and an example
     7This is probably the easiest way to get energy consumption for your interactive and batch jobs. Once your job has finished, you can use the
     8`sacct` command to enquire the Slurm database about its energy consumption. For further information and an example
    109on how to use the command for energy measurements, please see [wiki:/Public/User_Guide/Batch_system#Informationonpastjobsandaccounting accounting].
    1110
    12 === DCDB (coming soon)
    13 
    14 The "Datacenter Database" very frequently (every 10 seconds) stores measured values from node and infrastructure sensors including power and
    15 energy consumption of the compute nodes. This allows for a very fine grained analysis of consumed energy for your jobs, e.g. by specifying
    16 precise time stamps / ranges and by providing access to measured data from different components like CPU, GPU, memory etc. instead of making
    17 available an accumulated value only. On the other hand it offers a convenient way for analysis of SLURM jobs.
    18 
    19 The DCDB can be queried from the login node using the DCDB client tools. A user guide that
    20 gives some more details on the database and explains how to use it for energy measurements will be attached to this page in the next days.
    21 
    22 === Use /sys files
    23 
    24 The energy meters provide their measured values through the "/sys" filesystem on the nodes using different files.
     11=== Using DCDB
     12
     13The "Data Center Data Base" (DCDB) stores measured values from node and infrastructure sensors at a high frequency (every 10 seconds), including power and
     14energy consumption of the compute nodes. This allows for a very fine-grained analysis of consumed energy for your jobs, e.g. by specifying
     15precise time-stamp ranges and by leveraging access to measured data from different components like CPU, GPU or memory, instead of using only single accumulated values. Hence, it offers a convenient way for analysis of SLURM jobs.
     16
     17DCDB is currently deployed on the DEEP-EST prototype and it is continuously collecting sensor data. A total of 62595 sensors are available, each with a time-to-live of 30 days. Please refer to D5.4 for the full list of monitored sensors and further details about the DCDB deployment. The DCDB Gitlab [https://dcdb.it repository] is also a good source of documentation and usage examples. Two types of data are available:
     18
     19
     20* **Sensor Data**: ordinary sensors sampled from the compute nodes or the surrounding infrastructure (e.g., power, temperature, CPU instructions).
     21* **Job Data**: a selected number of sensors are aggregated on a per-job basis, i.e., from all the compute nodes on which a certain job was running.
     22
     23DCDB is installed on the DEEP-EST {{{deepv}}} login node, from which data can be queried. To prepare the shell environment and expose the DCDB tools, please run the following:
     24
     25{{{
     26source /opt/dcdb/dcdb.bash
     27}}}
     28
     29At this point DCDB data can be queried using the {{{dcdbquery}}} and {{{dcdbconfig}}} tools. A distributed Cassandra instance is running on the dp-mngt01, dp-mngt02 and dp-mngt03 machines: only these three should be queried by the DCDB tools. By default, there is no need to be specify the target host, as the DCDB tools use a pre-defined value; in case you wish to explicitly select a host to be queried, you can do so with the {{{-h}}} option.
     30
     31==== The dcdbconfig Tool
     32
     33The {{{dcdbconfig}}} tool can be used to perform a variety of metadata-related actions. Running the following command will list all available actions:
     34
     35{{{
     36dcdbconfig help
     37}}}
     38
     39We will present the main dcdbconfig actions that can be of use to users. To print the complete list of sensors available to be queried on the prototype, run the following command:
     40
     41{{{
     42dcdbconfig sensor listpublic
     43}}}
     44
     45To show the metadata for a specific sensor name, run the following command:
     46
     47{{{
     48Template: dcdbconfig sensor show <SENSORNAME>
     49Example:  dcdbconfig sensor show /deepest/esb/s25/MemUsed
     50}}}
     51
     52Sensor names are slash-separated strings structured like MQTT topics, where each segment indicates a level of the system (e.g., {{{deepest}}} system, {{{esb}}} module, {{{s25}}} compute node). To show the list of jobs stored in the DCDB database, that are currently running on the prototype, run the following command:
     53
     54{{{
     55dcdbconfig job running
     56}}}
     57
     58To show the details of a specific job (e.g., node list, start time), run the following command:
     59
     60{{{
     61Template: dcdbconfig job show <JOBID>
     62Example:  dcdbconfig job show 17435
     63}}}
     64
     65A series of other actions to manage the sensor database are available, however users are
     66advised not to use them so as not to alter the system’s behavior.
     67
     68==== The dcdbquery Tool
     69
     70The {{{dcdbquery}}} tool allows to perform sensor queries, returning results in CSV format. It requires a sensor name and a time range. To perform a basic query, run the following:
     71
     72{{{
     73Template: dcdbquery <SENSORNAME> <TSTART> <TEND>
     74Example:  dcdbquery /deepest/cn/s01/power now-5m now
     75}}}
     76
     77Instead of a single sensor, a list of space-separated sensor names can be supplied as well; these will be queried sequentially. Instead of using relative time-stamps, absolute time-stamps (in nanoseconds) can also be used:
     78
     79{{{
     80Example: dcdbquery /deepest/cn/s01/power 159654356469315800 1596543788812750000
     81}}}
     82
     83==== Using dcdbquery for Job Queries
     84
     85DCDB collects a series of aggregated metrics for each job running on the system, every 10s. These can be queried using the same {{{dcdbquery}}} syntax as above. The sensor name, however, should be constructed as follows:
     86
     87{{{
     88Template: /job<JOBID>/<SENSORNAME><STATNAME>
     89Example:  /job788354/pkg-energy.avg
     90}}}
     91
     92The {{{<JOBID>}}} field identifies the job to be queried. {{{<SENSORNAME>}}} identifies instead the aggregated metric and can be one of the following:
     93
     94* energy
     95* dram-energy
     96* pkg-energy
     97* MemUsed
     98* instructions
     99* cpu-cycles
     100* cache-misses
     101* cache-misses-l2
     102* cache-misses-l3
     103* scalar-double
     104* scalar-double-128
     105* scalar-double-256
     106* scalar-double-512
     107* gpu-energy (DAM, ESB)
     108* ib-portXmitData (CN, ESB)
     109* ib-portRcvData (CN, ESB)
     110
     111Finally, the {{{<STATNAME>}}} field identifies the actual type of aggregation performed from the readings of the queried sensor, by combining the data of all compute nodes on which the job was running. It can be one of the following:
     112
     113* .avg (average)
     114* .med (median)
     115* .sum (sum)
     116
     117In addition, for jobs that are running on multiple modules of the prototype, per-module aggregated metrics are also available. In this case, the sensor name is built as follows:
     118
     119{{{
     120Prototype: /job<JOBID>/<MODULE>/<SENSORNAME><STATNAME>
     121Example:   /job1001/esb/instructions.med
     122}}}
     123
     124The {{{<MODULE>}}} field identifies the prototype module to query, and can be one of the following:
     125
     126* cn (Cluster Module)
     127* esb (Extreme-Scale Booster)
     128* dam (Data Analytics Module)
     129
     130==== Long-term Sub-sampled Sensor Data
     131
     132The sensor data collected by DCDB (including per-job data) has a time-to-live of 30 days. After this interval the data will be automatically erased from the database. However, to keep track of the system’s history, DCDB automatically computes sub-sampled versions of all sensors. These are kept forever in the database, and can be queried as follows:
     133
     134{{{
     135Template: dcdbquery “<OPNAME>(<SENSORNAME>)” <TSTART> <TEND>
     136Example:  dcdbquery “.avg300(/deepest/cn/s01/power)” now-1h now
     137}}}
     138
     139In this case, quoting is required to ensure proper parsing of the command in the shell. The {{{<OPNAME>}}} field defines the particular type of sub-sampling that is to be queried for the given sensor. The following alternatives are available:
     140
     141* .avg300 (5-minute averages)
     142* .avg3600 (hourly averages)
     143
     144DCDB computes sub-sampled versions of all sensors, with the exception of CPU core-level sensors (e.g., performance counters for specific CPU cores) and per-job sensors, to avoid inflating the size of the databases indefinitely. In general, the operations available for a DCDB sensor are shown along with its metadata when using the {{{dcdbconfig sensor show}}} command.
     145
     146==== Grafana Visualization
     147
     148A Grafana instance is also running and is reachable at {{{grafanavm:3000}}}. The {{{grafanavm}}} host is visible only from the prototype’s network, so ssh tunneling is required to reach it. In order to use Grafana, an account must be created: if you wish to have access, please contact Alessio Netti (alessio.netti@lrz.de) and one will be created for you. Normally, the Grafana instance should be already set up and you will not need to configure the DCDB data source. If that is not the case, please follow the instructions below.
     149
     150Log into the Grafana web frontend and navigate into the {{{Configuration->Data Sources}}} menu. Here, click on {{{Add Data Source}}} and select DCDB. Please use the following values for the required fields in the configuration window of the DCDB data source:
     151
     152{{{
     153URL: https://dp-mngt01:8081
     154Access: Server (Default)
     155User and Password: admin
     156Check "Basic Auth" and "Skip TLS Verify" under the "Auth" table
     157}}}
     158
     159At this point click on {{{Save & Test}}} once and, if the procedure was successful, you will be ready to add dashboards and panels using DCDB data.
     160
     161
     162=== Using /sys files
     163
     164The energy meters provide their measured values through the "/sys" filesystem on the compute nodes using different files.
    25165To query the overall energy (in Joules) a node has consumed so far, you can use the `energy_j` file.
    26166You should integrate readings in your SLURM job script before and after you `srun` your commands to measure
    27 consumed energy by your commands (applications):
    28  
     167consumed energy by your commands (applications): 
     168
    29169Unit=[Joules]
    30170
     
    32172
    33173{{{
    34 srun sh -c 'if [ $SLURM_LOCALID == 0 ]; then echo ${SLURM_NODEID}: $(cat /sys/devices/platform/sem/energy_j); fi'
     174srun sh -c 'if [ $SLURM_LOCALID == 0 ]; then echo ${SLURM_NODEID}: $(cat /sys/devices/platform/sem.5/energy_j); fi'
    35175}}}
    36176