The divider core
The divider core is the core plugin used by default by the vJoule
service. It divides the consumptions of the watched cgroups using
their consumption. It can monitor three different kind of sensor
plugins cpu, gpu and ram.
A result directory is created for every watched cgroup. Each of them
will contain three files cpu, ram and gpu containing the
consumption of the cgroup in joule since its creation (i.e. since the
moment vjoule started monitoring them).
Basic tutorial
Usage
A default configuration and explanation of the divider plugin can be
acquired by running the command vjoule_service --ph divider.
Default configuration
Here an example of configuration that can be used by the divider core :
[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/service.log" # log file (empty means stdout)
# the name of the core plugin to use for the sensor
core = "divider"
# 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
# following configuration is optional
# It activates some part of the divider
[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 of amd cpus
The flag delete-res can sometime comes in handy when monitoring
cgroups that are appearing and disappearing during the lifetime of an
experiment. It will forbid the service to remove the result
directories when the cgroup disappear. By default result directories
are deleted when cgroups disappear to avoid using two much memory or
disk space.
On the other hand the flag mount-tmpfs will make the divider
plugin mount the result directory in tmpfs, to avoid making I/O access
when writting the result.
Cgroups file
The divider 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