The dumper core

The dumper is a core plugin that can be used to dump the metrics of the system, and the different plugin sensors. It can monitor four different kind of sensor plugins cpu, gpu, ram and pdu, and be attached to different perf events for the cgroups that are determined by the configuration file.

Result files

Unlike the divider plugin, the dumper writes only two files in the result directory (by default /etc/vjoule/results/):

  • cgroups.csv - this file contains the perf events watched by the plugin, for each of the watched cgroups
  • energy.csv - this file contains the energy consumptions returned by the different connected plugins

Usage

As any plugin, a default configuration and explanation of the dumper plugin can be acquired by running the command vjoule_service --ph dumper.

Default configuration

Here is an explanation of configuration that can be used by the dumper plugin :

[sensor]
freq = 1 # frequency of update in hertz (the higher the faster)
log-lvl = "info" # debug < success < info < warn < error < none
log-path = "/etc/vjoule/log" # log file (empty means stdout)
core = "dumper" # the name of the core plugin to use for the sensor
# the directory in which result will be written
output-dir = "/etc/vjoule/results"

# delete cgroup result directories when the cgroup no longer exists
delete-res = true

# if true mount the result directory in tmpfs (less i/o generated by vjoule)
mount-tmpfs = true

perf-counters = ["LLC_MISSES", "PERF_COUNT_HW_CPU_CYCLES"] # The list of performances counters to monitor

# following configuration is optional
# It activates some part of the dumper

[cpu] # configuration to enable CPU energy reading
name = "rapl" # rapl plugin for compatible intel or amd cpus

[ram] # configuration to enable RAM energy reading
name = "rapl" # rapl plugin for compatible intel or amd cpus

[gpu:0] # configuration to enable GPU energy reading
name = "nvidia" # nvidia plugin for nvidia GPUs

# A machine can have different GPU from different constructors
# For example a integrated GPU, and an nvidia GPU card
[gpu:1] # configuration to enable GPU energy 
name = "rapl" # rapl plugin form compatible intel or amd cpus

[pdu] # configuration to enable smart PDU reading
name = "yocto" # the yocto plugin to read YoctoWatt PDU consumption

One can note the value perf-counters which is specific to the dumper plugin and did not appear on the divider core. This value defines the list of perf events to watched for each cgroups monitored by vJoule, and defines the values that will be dumped inside the cgroups.csv file.

Cgroups file

The dumper core plugin uses another configuration file, in /etc/vjoule/cgroups, to filter the cgroups that are watched by the sensor, and ignore unwanted cgroups. This configuration file is a list of rules, every rules must start with a slice (a cgroup that contains other cgroups). For example my.slice/*., will make the sensor watch all the cgroups in the slice my.slice, and system.slice/docker* will watch all the cgroups in system.slice that starts with docker. Basically, it lists all the cgroups that would be found if the command ls my_rule was run in the cgroup mount directory. The following presents an example of configuration for cgroup listing that has to be placed in /etc/vjoule/cgroups.

vjoule.slice/*
system.slice/docker*
my_custom.slice/my_custom_cgroup