Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ not need a benchmark machine to work on it.

## Security

The benchmark machines and the scheduler are **self-hosted GitHub Actions
runners on a public repository**. Code from a pull request must never reach
them:

- Workflows that run on self-hosted runners are triggered only by `schedule`,
`workflow_dispatch` or `workflow_call` from `main`, never by `pull_request`
or `pull_request_target`. `tests/test_workflows.py` enforces this.
- Benchmark machines hold no write credentials. Only the scheduler can push to
speedR-results.
The benchmark machines run in a private Slurm cluster; nothing in this
public repository starts work on them. Code from a pull request must never
reach them:

- The machines run only commits a maintainer checked out on them, and jobs
only from accounts of the cluster. No workflow here may run on a
self-hosted runner when triggered by `pull_request` or
`pull_request_target`; `tests/test_workflows.py` enforces this.
- Benchmark machines hold no write credentials. Only the controller can push
to speedR-results (a deploy key for that repository alone).

If you find a security problem, please do not open a public issue. Contact
the maintainers privately through GitHub's *Report a vulnerability* button on
Expand Down
49 changes: 27 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ the results as a static dashboard, in the spirit of
[R Consortium](https://www.r-consortium.org) ISC grant, *Measuring R
Performance*.

> **Status: early development.** The dashboard renders synthetic data only
> (every page says so). Nothing here is a measurement of R yet. See
> [Roadmap](#roadmap).
> **Status: early development.** The first measurements (methodology 0.2,
> a draft) are on the dashboard, <https://prl-prg.github.io/speedR-results/>.
> See [Roadmap](#roadmap).

## What is in this repository

| path | what |
|---|---|
| [`site/`](site/) | the dashboard: Quarto + R, static ([README](site/README.md)) |
| [`speedr/`](speedr/) | the pipeline (Python): identifiers, machine registry, run metadata, the suite pin; build/ingest stages to come |
| [`speedr/`](speedr/) | the pipeline (Python): identifiers, machine registry, run metadata, the suite pin, build settings, the sentinel, the ingest into speedR-results |
| [`drivers/`](drivers/) | the timing and profile passes, built on r-benchmarks' `rbench` and `rbench.perf` |
| [`categories/`](categories/) | the perf frame classifier from VMIL'26 (`perf-rules.R`) and the step that turns recordings into category shares |
| [`machines/`](machines/) | one TOML file per benchmark machine ([how to add one](docs/machines.md)) |
| [`machines/`](machines/) | one TOML file per machine: a set of identical boxes, with the sentinel's reference times |
| [`build/`](build/) | how R is built: the toolchain image (upstream GCC 16), the per-version settings ([`settings.toml`](build/settings.toml)) and the build script |
| [`node/`](node/) | running on the benchmark machines: `speedr-node` (build, timing pass, results to the controller) and `speedr-submit` (queue it as a Slurm job) |
| [`node/`](node/) | running on the cluster: `speedr-node` (build; sentinel and timing pass, results to the controller), `speedr-submit` (queue it as a Slurm job) and, on the controller, `speedr-publish` (ingest and push to speedR-results) |
| [`configs.toml`](configs.toml) | build configurations: default, no-bytecode, LTO, GC variants, PGO, ... |
| [`methodology/`](methodology/) | methodology versions: every run records the one it was measured under ([rules](methodology/README.md)) |
| [`docs/`](docs/) | [benchmarking guidelines](docs/guidelines.md) (draft), [machines](docs/machines.md) |
| [`docs/`](docs/) | [benchmarking guidelines](docs/guidelines.md) (draft) |
| [`tests/`](tests/) | Python tests, including the workflow security rules |

Related repositories:
Expand All @@ -39,23 +39,24 @@ Related repositories:
r-benchmarks is built on. speedR does not pin it separately: it uses the
commit r-benchmarks' `uv.lock` locks.
- [PRL-PRG/speedR-results](https://github.com/PRL-PRG/speedR-results): the
results, under CC0.
results, under CC0 (branch `results`); every push there renders the
dashboard.

## How it works

```
new R release / R-devel revision
│
speedr-submit (controller) ──► Slurm ──wake──► benchmark box (Slurm prolog: booted? probe)
│ build R (pinned image, cached)
│ sentinel (R 4.5.2, against the machine)
│ timing pass (r-benchmarks)
controller spool ◄──── rsync ─────────────┘
│ speedr-publish (cron): ingest, commit, push
▼
GitHub Actions (the queue) ──► scheduler (always on) ──wake──► benchmark machine
│ build R (pinned image)
│ timing pass (r-benchmarks)
│ profile pass (perf)
◄──────── results artifact ─────┘
scheduler validates and commits to speedR-results ──► dashboard re-render
speedR-results `results` ──► GitHub Actions renders the dashboard (Pages)
```

Speedups are only computed between runs **on the same machine**. The baseline
Speedups are only computed between runs **on the same machine** (a set of
identical boxes, checked against each other by the probe and the sentinel). The baseline
(1×) is the R version shipped in the newest Ubuntu LTS. The details are in
[the guidelines](docs/guidelines.md) and on the dashboard's Methodology page.

Expand Down Expand Up @@ -92,28 +93,32 @@ From the controller:

```sh
speedr-submit build 4.5.2 devel # one build job each (devel: today's R-devel snapshot)
speedr-submit run 4.5.2 # build if needed, then the timing pass
speedr-submit run 4.5.2 # build if needed, then the sentinel and the timing pass
uv run speedr build-env 3.6.1 # the compilers and settings an R version is built with
```

The controller has the same checkout as `~speedr/speedr`, a checkout of
speedR-results' `results` branch as `~speedr/speedR-results` (a deploy key may
push to it) and runs `node/speedr-publish` from speedr's crontab.

Dashboard ([Quarto](https://quarto.org) ≥ 1.11 and R ≥ 4.3):

```sh
cd site
Rscript -e 'pak::local_install_deps()' # or install the packages in site/DESCRIPTION
quarto preview # live preview
quarto render # static site in site/_site/
SPEEDR_RESULTS=../../speedR-results/index quarto render # real data
SPEEDR_RESULTS_ROOT=../../speedR-results ./render.sh # real data, one site per methodology
```

## Roadmap

| phase | what | status |
|---|---|---|
| 1 | repositories, licences, contributor guide, CI | in progress |
| 2 | build layer: pinned images, GNU R builds 3.0.0 to R-devel | |
| 3 | timing pass, results repository, scheduler, power management | |
| 4 | dashboard on real data | mockup done |
| 2 | build layer: pinned images, GNU R builds 3.0.0 to R-devel | done |
| 3 | timing pass, results repository, scheduler, power management | done (methodology 0.2, draft) |
| 4 | dashboard on real data | first releases |
| 5 | profiles: perf pass, categorisation, quality gates | |
| 6 | nightly R-devel and change detection | |
| 7 | backfill of 3.x releases | |
Expand Down
4 changes: 2 additions & 2 deletions docs/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ project and will be refined as the pipeline is built; sections marked

## 3. Running benchmarks

- **Run design.** 5 separate R processes per benchmark, each running 1 warm-up
and 4 measured iterations (r-benchmarks' own default is 3 processes of 2 + 3;
- **Run design.** Separate R processes per benchmark (3 under methodology 0.2),
each running 1 warm-up and 4 measured iterations (r-benchmarks' own default is 3 processes of 2 + 3;
speedR's drivers set theirs). The process is the unit of replication: the spread
between processes is larger than the spread within one.
- **Order.** Benchmarks run in a shuffled order with a fixed seed.
Expand Down
66 changes: 0 additions & 66 deletions docs/machines.md

This file was deleted.

2 changes: 1 addition & 1 deletion drivers/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bench import Context, Params, Thermal

# r-benchmarks' own defaults are 3 runs x 5 iterations, 2 of them warm-up.
RUN_DESIGN = {"runs": 5, "iterations": 5, "warmups": 1}
RUN_DESIGN = {"runs": 3, "iterations": 5, "warmups": 1} # methodology 0.2


class TimingParams(rb.RbenchHarnessParams):
Expand Down
22 changes: 22 additions & 0 deletions machines/kabylake.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# The Intel Core i7-7700K boxes: Slurm partition `kabylake` of the prlprg-bench
# cluster (MSI Z270M Mortar, BIOS 1.60, 32 GB). Their results are one series;
# the sentinel checks each run's box against the reference below.
name = "kabylake"
os = "linux"
arch = "x86_64"
cpu = "Intel Core i7-7700K at a fixed 4.2 GHz (turbo and SMT off), 32 GB"
cores = "3" # isolated core the benchmarks are pinned to
runtime = "docker"
profiler = "perf"
profiles = "validated" # perf on x86-64 is the method VMIL'26 validated
track_devel = true
wake = "wol"

# Reference times (ms) of the sentinel benchmarks under R 4.5.2: medians of 7
# runs on prl-prg-bench4-ubuntu, 2026-11-20, before and after a power cycle
# (spread under 1%). Empty: not calibrated, every run passes.
[sentinel]
"areWeFast/bounce" = 979.2
"shootout/nbody/nbody" = 723.0
"mathkernel/DoubleVecAdd-T1" = 1134.1
"R-benchmark-25/Programmation/att3_1" = 881.4
15 changes: 0 additions & 15 deletions machines/prl-bench-x64-1.toml

This file was deleted.

Loading