-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
535 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,59 @@ | ||
# Configuration File | ||
|
||
Use `config.py` as the starting point for your configuration file. | ||
Use `config.py` in the [Jobstats GitHub repository](https://github.com/PrincetonUniversity/jobstats) as the starting point for your configuration file. | ||
|
||
Here is an explanation: | ||
|
||
```python | ||
# prometheus server address and port | ||
PROM_SERVER = "http://vigilant2:8480" | ||
``` | ||
|
||
The number of seconds between measurements by the exporters on the compute nodes: | ||
|
||
``` | ||
# number of seconds between measurements | ||
SAMPLING_PERIOD = 30 | ||
``` | ||
|
||
One can use the Python blessed package to produce bold and colorized text. This | ||
helps to draw the user's attention to specific lines of the report. This part | ||
of the configuration sets the various thresholds: | ||
|
||
``` | ||
# threshold values for red versus black notes | ||
GPU_UTIL_RED = 15 # percentage | ||
GPU_UTIL_BLACK = 25 # percentage | ||
CPU_UTIL_RED = 65 # percentage | ||
CPU_UTIL_BLACK = 80 # percentage | ||
TIME_EFFICIENCY_RED = 40 # percentage | ||
TIME_EFFICIENCY_BLACK = 70 # percentage | ||
MIN_MEMORY_USAGE = 70 # percentage | ||
MIN_RUNTIME_SECONDS = 10 * SAMPLING_PERIOD # seconds | ||
``` | ||
|
||
``` | ||
# translate cluster names in Slurm DB to informal names | ||
CLUSTER_TRANS = {"tiger":"tiger2"} | ||
#CLUSTER_TRANS = {} # if no translations then use an empty dictionary | ||
CLUSTER_TRANS_INV = dict(zip(CLUSTER_TRANS.values(), CLUSTER_TRANS.keys())) | ||
# maximum number of characters to display in jobname | ||
MAX_JOBNAME_LEN = 64 | ||
# default CPU memory per core in bytes for each cluster | ||
# if unsure then use memory per node divided by cores per node | ||
DEFAULT_MEM_PER_CORE = {"adroit":3355443200, | ||
"della":4194304000, | ||
"stellar":7864320000, | ||
"tiger":4294967296, | ||
"traverse":7812500000} | ||
# number of CPU-cores per node for each cluster | ||
# this will eventually be replaced with explicit values for each node | ||
CORES_PER_NODE = {"adroit":32, | ||
"della":28, | ||
"stellar":96, | ||
"tiger":40, | ||
"traverse":32} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# cgroups | ||
|
||
Slurm has to be configured to track job accounting data via the cgroup plugin. This requires the following line in slurm.conf: | ||
|
||
``` | ||
JobAcctGatherType=jobacct_gather/cgroup | ||
``` | ||
|
||
The above is in addition to the other usual cgroup related plugins/settings: | ||
|
||
``` | ||
ProctrackType=proctrack/cgroup | ||
TaskPlugin=affinity,cgroup | ||
``` | ||
|
||
Slurm will then create two top-level cgroup directories for each job, one for CPUutilization and one for CPU memory [17]. Within each directory there will be subdirectories: step_extern, step_batch, step_0, step_1, and so on. Within these directories one finds task_0, task_1, and so on. These cgroups are scraped by a cgroup exporter [14]. Table 1 lists all of the collected fields. | ||
|
||
The cgroup exporter used here is based on Ref. [3] with additional parsing of the jobid, steps, tasks and UID number. This produces an output that resembles (e.g., for system seconds): | ||
|
||
``` | ||
cgroup_cpu_system_seconds{jobid="247463", step="batch", task="0"} | ||
160.92 | ||
``` | ||
|
||
Note that the UID of the owning user is stored as a gauge in cgroup_uid: | ||
|
||
``` | ||
cgroup_uid{jobid="247463"} 334987 | ||
``` | ||
|
||
This is because accounting is job-oriented and having a UID of the user as a label would needlessly increase the cardinality of the data in Prometheus. All other fields are alike with jobid, step and task labels. | ||
|
||
The totals for a job have an empty step and task, for example: | ||
|
||
``` | ||
cgroup_cpu_user_seconds{jobid="247463", step="", task=""} | ||
202435.71 | ||
``` | ||
|
||
This is due to the organization of the cgroup hierarchy. Consider the directory: | ||
|
||
``` | ||
/sys/fs/cgroup/cpu,cpuacct/slurm/uid_334987 | ||
``` | ||
|
||
Within this directory, one finds the following subdirectories: | ||
|
||
``` | ||
job_247463/cpuacct.usage_user | ||
job_247463/step_extern/cpuacct.usage_user | ||
job_247463/step_extern/task_0/cpuacct.usage_user | ||
``` | ||
|
||
This is the data most often retrieved and parsed for overall job efficiency which is why by default the cgroup_exporter does not parse step or task data. To collect all of it, add the--collect.fullslurm option. We run the cgroup_exporter with these options: /usr/sbin/cgroup_exporter--config.paths /slurm \--collect.fullslurm The--config.paths /slurm has to match the path used by Slurm under the top cgroup directory. This is usually a path that is something like `/sys/fs/cgroup/memory/slurm`. | ||
|
||
| Name | Description | Type | | ||
| ---- | ----------- | ---- | | ||
| cgroup_cpu_system_seconds | Cumulative CPU system seconds for jobid | gauge | | ||
| cgroup_cpu_total_seconds | Cumulative CPU total seconds for jobid | gauge | | ||
| cgroup_cpu_user_seconds | Cumulative CPU user seconds for jobid | gauge | | ||
| cgroup_cpus | Number of CPUs in the jobid | gauge | | ||
| cgroup_memory_cache_bytes | Memory cache used in bytes | gauge | | ||
| cgroup_memory_fail_count | Memory fail count | gauge | | ||
| cgroup_memory_rss_bytes | Memory RSS used in bytes | gauge | | ||
| cgroup_memory_total_bytes | Memory total given to jobid in bytes | gauge | | ||
| cgroup_memory_used_bytes | Memory used in bytes | gauge | | ||
| cgroup_memsw_fail_count | Swap fail count | gauge | | ||
| cgroup_memsw_total_bytes | Swap total given to jobid in bytes | gauge | | ||
| cgroup_memsw_used_bytes | Swap used in bytes | gauge | | ||
| cgroup_uid | UID number of user running this job | gauge | |
Oops, something went wrong.