HPCPerfStats
The package formerly known as TACC Stats
A toolkit for monitoring resource usage on HPC systems at multiple levels of resolution.
Overview
The hpcperfstats package is split into two parts:
| Component |
Build system |
Role |
| monitor |
Autotools |
Online data collection and transmission in production |
| hpcperfstats |
Python setuptools |
Data curation and analysis (off-cluster) |
Documentation (docs/)
| Document |
What it is for |
| MONITOR_VARIABLES.md |
Canonical reference for monitor-reported variables: names, types, units, and semantics. Use this instead of any legacy “attributes definition” doc. |
| DEPLOY_CONCURRENCY_AND_NUMA.md |
Thread/process limits vs PostgreSQL, total_cores / effective_cores, and pool sizing for web and pipeline. |
| design-document.md |
As-built system design: architecture, data flow, components, contracts, and operations context. |
| measurements/ |
Recorded ops measurements (for example node-daemon CPU overhead on Stampede3 SPR). |
| using-the-website-as-a-researcher.md |
How to read the Django/React job UI—plots, metrics, and diagnostic themes—for HPC users and researchers. |
| TESTING.md |
Test commands, CI, compose-backed workflows, Playwright/Vitest, and host vs container pytest notes. |
| upgrade.md |
Existing stacks only: image rebuilds, Valkey/INI/volume layout, RabbitMQ recreate, PG18 dual-run. |
Maintaining MONITOR_VARIABLES.md: the catalog is generated and augmented by maintainer scripts in the same folder: regenerate_monitor_variables_catalog.py, augment_monitor_variables_diagnostics.py.
Retired (completed migrations)
Kept for a new site or a repair only; nothing here needs to run on the current fleet. Helper scripts live under scripts/retired/.
| Document |
Status |
Retired scripts |
| OPERATOR_HOST_DATA_DEV_UNIQUENESS.md |
Complete fleet-wide (2026-11). host_data 5-col uniqueness: Stage 1 decompress (+ 02 PK normalize), NULL dev backfill, Stage 2 one-shot migrate for 0032 / compress_after 8d, 0045 duplicate-index drop. |
scripts/retired/decompress_host_data_chunks.sh, scripts/retired/backfill_host_data_null_dev.sh |
Per-core host_data repair (no separate doc; usage in the script header) |
Complete (2026-11). Sums per-core non-GPU rows written between regression ce8f834f and fix dbcabf0e into one dev='' row per metric. The manage.py collapse_percore_host_data command stays in place for a site that ingested with the regression. |
scripts/retired/collapse_percore_parallel.sh |
REST API note: GET /api/jobs/{jid}/{type_name}/ (type detail) returns a Bokeh tplot_item (json_item payload) plus stats_data / schema. Legacy tscript / tdiv fields were removed; clients should embed only tplot_item via Bokeh embed_item.
API contract changes (2026-06):
GET /api/jobs/ with filters that match zero jobs now returns HTTP 200 with nj: 0, an empty job_list, and a filter_summary object. Do not treat HTTP 404 as “no matches” for successful searches (404 is reserved for database/unavailable errors on this endpoint).
GET /api/search/ was removed; job-ID and host routing are handled in the React SPA. API clients should use GET /api/jobs/?jid=… (or open /machine/job/{jid}/ in a browser) instead of the old search redirect endpoint.
Building and installing the hpcperfstatsd-3.1-1.el9.x86_64.rpm package (via monitor/hpcperfstats.spec) installs a systemd service hpcperfstats. Production sampling is typically configured for multi-minute intervals (often on the order of minutes), with samples at job start and end. On a Stampede3 Sapphire Rapids node (2026-08-14), a ten-minute pidstat observation of hpcperfstatsd showed sample-window peaks of at most 3.0% of one core and a 0.19% average over the full window; see docs/measurements/monitor_overhead_stampede3_spr_2026-08-14.md. The daemon hpcperfstatsd sends data to a RabbitMQ server over the administrative network. RabbitMQ must be installed and running on the server to receive data.
The hpcperfstats container orchestration sets up a Django/PostgreSQL ingest and archival stack plus a RabbitMQ server to receive data from the monitor on the nodes.
Installation
These steps are a fresh install on a new host. For an existing Compose stack (rebuilds, Valkey/INI/volume/RabbitMQ changes, PostgreSQL 18 dual-run), use docs/upgrade.md instead.
Monitor subpackage
The monitor now uses a static-bundle build flow for packaging. The canonical path builds pinned static archives for libev and rabbitmq-c (plus libbpf when the eBPF profiler is enabled) on every arch, then compiles hpcperfstatsd with --enable-all-static. x86 core counters come from perf_event directly, so no counter library is bundled.
Install RPM build prerequisites (Rocky/EL-like systems):
sudo dnf install \
gcc gcc-c++ make autoconf automake libtool cmake pkgconfig \
systemd-rpm-macros gzip tar curl perl gawk pciutils rdma-core-devel \
rpm-build
On aarch64, install one of:
sudo dnf install datacenter-gpu-manager-4-devel
# or
sudo dnf install libdcgm-devel
Prepare rpmbuild directories and source tarball (from HPCPerfStats/monitor):
./scripts/prepare_rpmbuild_dirs.sh
This script:
- creates
monitor/rpmbuild/{SPECS,SOURCES,BUILD,RPMS,SRPMS,BUILDROOT}
- runs
scripts/build_static_bundle.sh --deps-only into monitor/rpmbuild/static-prefix
- runs
autoreconf -fi, ./configure, and make dist
- copies
hpcperfstats-<version>.tar.gz to rpmbuild/SOURCES
Build the RPM:
Use the rpmbuild command printed by scripts/prepare_rpmbuild_dirs.sh. A typical script output is:
rpmbuild -ba --define "_topdir $(pwd)/rpmbuild" rpmbuild/SPECS/hpcperfstats.spec
Optional build options:
- Reuse existing static deps when already staged:
SKIP_DEPS=1 ./scripts/prepare_rpmbuild_dirs.sh
- Build dependencies + monitor binary directly (without rpmbuild staging):
./scripts/build_static_bundle.sh
- Build only pinned dependency archives:
./scripts/build_static_bundle.sh --deps-only
- Release-optimized monitor build:
./scripts/build_static_bundle.sh --release
# equivalent to: HPC_BUNDLE_RELEASE_BUILD=1 ./scripts/build_static_bundle.sh
- Pass extra configure args through bundle build (example):
./scripts/build_static_bundle.sh --disable-lustre
Configuration — after install, edit /etc/hpcperfstats/hpcperfstats.conf:
| Field |
Description |
server |
Hostname or IP of the RabbitMQ server |
queue |
System/cluster name being monitored |
port |
RabbitMQ port (default 5672) |
freq |
Sampling interval in seconds |
Example:
server localhost
queue default
port 5672
freq 600
Reload a running daemon with: kill -HUP <pid> (or restart the service).
Service control:
sudo systemctl start hpcperfstats
sudo systemctl stop hpcperfstats
sudo systemctl restart hpcperfstats
Job scheduler configuration
Job start/end: Notify hpcperfstats by writing to /var/run/stats_jobid on each node:
- Job start: echo the job ID into the file
- Job end: echo
- into the file
Do this from your scheduler’s prolog and epilog.
Shared-node fleets: apply migration 0036 and the listend / sync_timedb consumer before installing a monitor built with --enable-shared-node-multi-jid. That build discovers job ids from process environments and does not use /var/run/stats_jobid. Default file-mode monitors keep the prolog/epilog file above. Shared-node samples add %jobs and %affinity lines. The consumer stores CPU/GPU affinity in job_affinity and stamps non-GPU host_data.dev as j:<jid> so two jobs can share a host second. That dev key is the shared-node membership on host_data. Payloads without those marks stay on empty dev. An allocated node whose steps have finished is still tagged with the job (the monitor reads the root slurmstepd title). For older data, metrics count untagged samples toward a job on hosts it held alone (no other job in accounting or in job_affinity overlapping its window); a later accounting row for a co-tenant marks the job for recompute.
Accounting ingest (SLURM sacct): Use hpcperfstats-sacct-gen from the hpcperfstats-tools package. By default this command runs sacct for a date range and POSTs the results to the HPCPerfStats API ingest endpoint. Each successful POST also creates or overwrites a daily accounting file at {acct_path}/YYYY-MM-DD.txt (same pipe-delimited body Slurm returned) only when the body has at least one job row. Empty or header-only days are not written. Alternatively, use -f DIR to write those YYYY-MM-DD.txt files locally (same format/naming) without calling the API; -f is mutually exclusive with --api-key, and DIR must already exist. The scheduled sync_acct.py job can reingest these files from disk. Pass --dead-letter-unimportable to move a daily file that cannot be read or imported into {acct_path}/.unimportable-joblist; the flag is off by default, so a run without it leaves those files in place. A run with that flag ends by printing each moved file and the reason it was moved. The API rejects payloads with fewer lines than the existing file for that date (HTTP 409) so a partial sacct export cannot replace a fuller one. Header-only or empty POSTs skip the write without a 409.
Install the tools (Python):
# Client CLIs live in-tree under hpcperfstats-tools/ (separate distribution).
# From the HPCPerfStats git checkout:
python3 -m pip install ./hpcperfstats-tools
# Editable during development:
# python3 -m pip install -e ./hpcperfstats-tools
Configure the API base URL:
Set HPCPERFSTATS_TOOLS_INI to an INI file that contains [API] base_url (see hpcperfstats-tools/hpcperfstats-tools.ini.example in the repo for a template).
Run the ingest (requires a staff-capable API key):
# Ingest today only (default date range is today .. today, inclusive)
hpcperfstats-sacct-gen --api-key YOUR_KEY
# Ingest an explicit date range (both ends inclusive)
hpcperfstats-sacct-gen 2024-01-01 2024-01-08 --api-key YOUR_KEY
# Write daily YYYY-MM-DD.txt files locally instead of POSTing (DIR must exist;
# mutually exclusive with --api-key)
hpcperfstats-sacct-gen -f /path/to/accounting 2024-01-01 2024-01-08
Run-location and permissions requirements:
- Run
hpcperfstats-sacct-gen on a host where Slurm’s sacct binary exists and works (typically a Slurm login node).
- Run it as a user that has the correct Slurm permissions to query the relevant jobs/accounts via
sacct.
- API mode: