Skip to content

Commit e5976d2

Browse files
Merge branch 'develop' into fg/onpair-improvements
develop added benchmarks/string-bench (#9060), which uses vortex_onpair::DEFAULT_DICT12_CONFIG. This branch removes that constant in favour of re-exporting upstream onpair's DEFAULT_CONFIG, which holds the same values (dict-12, threshold 0.15, seed 42), so string-bench is updated to the new name. No textual conflicts. Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
2 parents 141dd76 + 49f98c3 commit e5976d2

78 files changed

Lines changed: 3948 additions & 680 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bench-pr.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
timeout-minutes: 120
2424
runs-on: >-
2525
${{ github.repository == 'vortex-data/vortex'
26-
&& format('runs-on={0}/runner=bench-dedicated/tag={1}{2}', github.run_id, matrix.benchmark.id, github.event.pull_request.head.repo.fork == false && '/extras=s3-cache' || '')
26+
&& format('runs-on={0}/runner=bench-dedicated/family=c6id.metal/tag={1}{2}', github.run_id, matrix.benchmark.id, github.event.pull_request.head.repo.fork == false && '/extras=s3-cache' || '')
2727
|| 'ubuntu-latest' }}
2828
strategy:
2929
matrix:
@@ -33,6 +33,10 @@ jobs:
3333
build_args: "--features lance"
3434
- id: compress-bench
3535
name: Compression
36+
# No run_args: the default suite emits the three tracked metrics
37+
# (size, write, read). The codec microbenchmark is a local diagnostic.
38+
- id: string-bench
39+
name: String Encoding
3640
steps:
3741
- uses: runs-on/action@v2
3842
if: github.event.pull_request.head.repo.fork == false
@@ -104,7 +108,8 @@ jobs:
104108
VORTEX_EXPERIMENTAL_PATCHED_ARRAY: "1"
105109
FLAT_LAYOUT_INLINE_ARRAY_NODE: "1"
106110
run: |
107-
bash scripts/bench-taskset.sh target/release_debug/${{ matrix.benchmark.id }} -d gh-json -o results.json
111+
bash scripts/bench-taskset.sh target/release_debug/${{ matrix.benchmark.id }} \
112+
${{ matrix.benchmark.run_args }} -d gh-json -o results.json
108113
109114
- name: Setup AWS CLI
110115
if: github.event.pull_request.head.repo.fork == false

.github/workflows/bench.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
timeout-minutes: 120
3636
runs-on: >-
3737
${{ github.repository == 'vortex-data/vortex'
38-
&& format('runs-on={0}/runner=bench-dedicated/extras=s3-cache/tag={1}', github.run_id, matrix.benchmark.id)
38+
&& format('runs-on={0}/runner=bench-dedicated/family=c6id.metal/extras=s3-cache/tag={1}', github.run_id, matrix.benchmark.id)
3939
|| 'ubuntu-latest' }}
4040
strategy:
4141
fail-fast: false
@@ -44,11 +44,17 @@ jobs:
4444
- id: random-access-bench
4545
name: Random Access
4646
build_args: "--features lance"
47-
formats: "parquet,lance,vortex"
47+
v4_ingest: true
4848
- id: compress-bench
4949
name: Compression
5050
build_args: "--features lance"
51-
formats: "parquet,lance,vortex"
51+
run_args: "--formats parquet,lance,vortex --ingest-jsonl results.ingest.jsonl"
52+
v4_ingest: true
53+
# No run_args: the default suite emits the three tracked metrics
54+
# (size, write, read). The codec microbenchmark is a local diagnostic.
55+
- id: string-bench
56+
name: String Encoding
57+
v4_ingest: false
5258
steps:
5359
- uses: runs-on/action@v2
5460
if: github.repository == 'vortex-data/vortex'
@@ -116,7 +122,8 @@ jobs:
116122
VORTEX_EXPERIMENTAL_PATCHED_ARRAY: "1"
117123
FLAT_LAYOUT_INLINE_ARRAY_NODE: "1"
118124
run: |
119-
bash scripts/bench-taskset.sh target/release_debug/${{ matrix.benchmark.id }} --formats ${{ matrix.benchmark.formats }} -d gh-json -o results.json --ingest-jsonl results.ingest.jsonl
125+
bash scripts/bench-taskset.sh target/release_debug/${{ matrix.benchmark.id }} \
126+
${{ matrix.benchmark.run_args }} -d gh-json -o results.json
120127
121128
- name: Setup AWS CLI
122129
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6
@@ -130,28 +137,30 @@ jobs:
130137
bash scripts/cat-s3.sh vortex-ci-benchmark-results data.json.gz results.json
131138
132139
# v4 (Postgres) ingest -- the REQUIRED benchmark-results pipeline feeding the live
133-
# benchmarks website; a failure here fails the job. Gated on the ingest-role ARN var
134-
# (the assume-role input that MUST exist for OIDC to succeed). post-ingest.py mints
135-
# the RDS IAM token internally (boto3) from the assumed GitHubBenchmarkIngestRole;
136-
# sslmode=verify-full validates the cert.
140+
# benchmarks website for suites that emit v4 records; a failure here fails the job.
141+
# All suites also upload S3 results above. string-bench does not emit
142+
# results.ingest.jsonl, so these steps are disabled for it.
143+
# Also gated on the ingest-role ARN var (the assume-role input that MUST exist for
144+
# OIDC to succeed). post-ingest.py mints the RDS IAM token internally (boto3) from
145+
# the assumed GitHubBenchmarkIngestRole; sslmode=verify-full validates the cert.
137146
#
138147
# `sync: false` -- the ingest runs `uv run --no-project --with`, which needs only
139148
# the uv binary, never the synced workspace. A full sync would rebuild
140149
# vortex-python via sccache->S3, which fails under the ingest-role creds
141150
# (rds-db:connect only) and is pure waste here.
142151
- name: Install uv for v4 ingest
143-
if: vars.GH_BENCH_INGEST_ROLE_ARN != ''
152+
if: vars.GH_BENCH_INGEST_ROLE_ARN != '' && matrix.benchmark.v4_ingest
144153
uses: spiraldb/actions/.github/actions/setup-uv@a746510eafaa926484c354541cfc49b2ec06cc63 # 0.18.6
145154
with:
146155
sync: false
147156
- name: Configure AWS credentials for v4 ingest (OIDC)
148-
if: vars.GH_BENCH_INGEST_ROLE_ARN != ''
157+
if: vars.GH_BENCH_INGEST_ROLE_ARN != '' && matrix.benchmark.v4_ingest
149158
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6
150159
with:
151160
role-to-assume: ${{ vars.GH_BENCH_INGEST_ROLE_ARN }}
152161
aws-region: ${{ vars.RDS_BENCH_REGION }}
153162
- name: Ingest results to v4 Postgres
154-
if: vars.GH_BENCH_INGEST_ROLE_ARN != ''
163+
if: vars.GH_BENCH_INGEST_ROLE_ARN != '' && matrix.benchmark.v4_ingest
155164
shell: bash
156165
env:
157166
RDS_BENCH_INSTANCE_ENDPOINT: ${{ vars.RDS_BENCH_INSTANCE_ENDPOINT }}

.github/workflows/ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,6 @@ jobs:
126126
pytest --benchmark-disable test/test_hf_datasets.py
127127
working-directory: vortex-python/
128128

129-
- name: Setup benchmark environment
130-
run: sudo bash scripts/setup-benchmark.sh
131-
132-
- name: Pytest Benchmarks - Vortex
133-
run: |
134-
bash ../scripts/bench-taskset.sh uv run --all-packages pytest --benchmark-only benchmark/
135-
working-directory: vortex-python/
136-
137129
- name: Doctest - PyVortex
138130
run: |
139131
uv run --all-packages make doctest
@@ -144,6 +136,16 @@ jobs:
144136
uv run --all-packages make html
145137
working-directory: docs/
146138

139+
# Keep this last: setup-benchmark.sh confines everything except the wrapped
140+
# benchmark to the housekeeping CPUs, so any step after it runs on few cores.
141+
- name: Setup benchmark environment
142+
run: sudo bash scripts/setup-benchmark.sh
143+
144+
- name: Pytest Benchmarks - Vortex
145+
run: |
146+
bash ../scripts/bench-taskset.sh uv run --all-packages pytest --benchmark-only benchmark/
147+
working-directory: vortex-python/
148+
147149
# Pins the measurement_id hash that scripts/post-ingest.py uses as the primary key of every
148150
# benchmarks-database fact row. The golden vectors are a frozen artifact (see the note inside
149151
# the JSON); this job fails if a change to scripts/_measurement_id.py drifts the hash, which

.github/workflows/codspeed.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,10 @@ jobs:
8484
env:
8585
RUSTFLAGS: "-C target-feature=+avx2"
8686
run: cargo codspeed build ${{ matrix.features }} $(printf -- '-p %s ' ${{ matrix.packages }}) --profile bench
87-
- name: Setup benchmark environment
88-
run: sudo bash scripts/setup-benchmark.sh
8987
- name: Run benchmarks
9088
uses: CodSpeedHQ/action@d872884a306dd4853acf0f584f4b706cf0cc72a2
9189
with:
92-
run: bash scripts/bench-taskset.sh cargo codspeed run
90+
run: cargo codspeed run
9391
token: ${{ secrets.CODSPEED_TOKEN }}
9492
mode: "simulation"
9593

.github/workflows/nightly-bench.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
matrix:
3131
machine_type:
3232
- id: x86
33-
instance_name: i7i.metal-24xl
33+
instance_name: c6id.metal

.github/workflows/rust-instrumented.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ jobs:
6767
sccache: s3
6868
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
6969
- uses: ./.github/actions/setup-prebuild
70+
with:
71+
enable-sccache: "true"
7072
- name: Ensure llvm-tools are installed
7173
run: |
7274
rustup component add llvm-tools || \
@@ -186,6 +188,8 @@ jobs:
186188
sccache: s3
187189
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
188190
- uses: ./.github/actions/setup-prebuild
191+
with:
192+
enable-sccache: "true"
189193
- name: Install Rust nightly toolchain
190194
run: |
191195
rustup toolchain install $NIGHTLY_TOOLCHAIN
@@ -253,6 +257,8 @@ jobs:
253257
sccache: s3
254258
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
255259
- uses: ./.github/actions/setup-prebuild
260+
with:
261+
enable-sccache: "true"
256262
- name: Install Rust nightly toolchain
257263
run: |
258264
rustup toolchain install $NIGHTLY_TOOLCHAIN
@@ -303,6 +309,8 @@ jobs:
303309
sccache: s3
304310
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
305311
- uses: ./.github/actions/setup-prebuild
312+
with:
313+
enable-sccache: "true"
306314
- name: Install nightly with miri
307315
run: rustup toolchain install $NIGHTLY_TOOLCHAIN --component rust-src,rustfmt,clippy,miri
308316
- name: Run Miri

.github/workflows/sql-benchmarks.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
machine_type:
1414
required: false
1515
type: string
16-
default: i7i.metal-24xl
16+
default: c6id.metal
1717

1818
jobs:
1919
resolve-matrix:
@@ -58,7 +58,7 @@ jobs:
5858

5959
runs-on: >-
6060
${{ github.repository == 'vortex-data/vortex'
61-
&& format('runs-on={0}/runner=bench-dedicated/instance-type={1}/tag={2}{3}', github.run_id, inputs.machine_type, matrix.id, (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false) && '/extras=s3-cache' || '')
61+
&& format('runs-on={0}/runner=bench-dedicated/family={1}/tag={2}{3}', github.run_id, inputs.machine_type, matrix.id, (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false) && '/extras=s3-cache' || '')
6262
|| 'ubuntu-latest' }}
6363
steps:
6464
- uses: runs-on/action@v2
@@ -166,7 +166,6 @@ jobs:
166166
--output results.json \
167167
--ingest-jsonl results.ingest.jsonl \
168168
--no-build \
169-
--runner "ec2_${{ inputs.machine_type }}" \
170169
${{ matrix.iterations && format('--iterations {0}', matrix.iterations) || '' }} \
171170
${{ matrix.scale_factor && format('--opt scale-factor={0}', matrix.scale_factor) || '' }}
172171
@@ -187,7 +186,6 @@ jobs:
187186
--output results.json \
188187
--ingest-jsonl results.ingest.jsonl \
189188
--no-build \
190-
--runner "ec2_${{ inputs.machine_type }}" \
191189
${{ matrix.iterations && format('--iterations {0}', matrix.iterations) || '' }} \
192190
--opt remote-data-dir="$REMOTE_STORAGE" \
193191
${{ matrix.scale_factor && format('--opt scale-factor={0}', matrix.scale_factor) || '' }}

Cargo.lock

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ members = [
6868
"benchmarks/datafusion-bench",
6969
"benchmarks/duckdb-bench",
7070
"benchmarks/random-access-bench",
71+
"benchmarks/string-bench",
7172
"vortex-geo",
7273
]
7374
exclude = ["java/testfiles", "wasm-test"]

bench-orchestrator/bench_orchestrator/cli.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""CLI for benchmark orchestration."""
55

66
import json
7+
import os
78
import subprocess
89
from contextlib import contextmanager
910
from datetime import datetime, timedelta
@@ -87,6 +88,17 @@ def run_ref_auto_complete() -> list[str]:
8788
return list(map(lambda x: x.run_id, ResultStore().list_runs(limit=None)))
8889

8990

91+
def default_runner() -> str | None:
92+
"""Derive the runner ID from the machine actually provisioned.
93+
94+
runs-on exposes the real EC2 instance type in RUNS_ON_INSTANCE_TYPE, which can
95+
differ from what the workflow requested, so records must never be labeled from
96+
workflow inputs.
97+
"""
98+
instance_type = os.environ.get("RUNS_ON_INSTANCE_TYPE")
99+
return f"ec2_{instance_type}" if instance_type else None
100+
101+
90102
def targets_from_axes(
91103
engine: str, format: str, benchmark: Benchmark | None = None
92104
) -> tuple[list[BenchmarkTarget], list[str]]:
@@ -265,7 +277,10 @@ def run(
265277
] = None,
266278
runner: Annotated[
267279
str | None,
268-
typer.Option("--runner", help="Benchmark runner ID (e.g., ec2_c6id.8xlarge)"),
280+
typer.Option(
281+
"--runner",
282+
help="Benchmark runner ID (e.g., ec2_c6id.metal); defaults to the actual EC2 instance type when available",
283+
),
269284
] = None,
270285
output: Annotated[
271286
Path | None,
@@ -281,6 +296,7 @@ def run(
281296
query_list = parse_queries(queries)
282297
exclude_list = parse_queries(exclude_queries)
283298
strict_failures = targets_json is not None
299+
runner = runner or default_runner()
284300

285301
try:
286302
bench_opts = parse_options(options)

0 commit comments

Comments
 (0)