Skip to content

Pgbench kernel ab benchmark - #31

Draft
nmanthey wants to merge 1 commit into
kernelci:mainfrom
nmanthey:pgbench-kernel-AB-benchmark
Draft

Pgbench kernel ab benchmark#31
nmanthey wants to merge 1 commit into
kernelci:mainfrom
nmanthey:pgbench-kernel-AB-benchmark

Conversation

@nmanthey

Copy link
Copy Markdown
Contributor

Adding the pgbench postgresql benchmark as a new highlevel regression benchmark. Coefficient of variance is low enough to consider this benchmark as a stable benchmark to detect regressions (CV 0.7–1.7%). Since the same postgresql version used. Running multiple test entries in one pipeline works.

Testing Done

Ran the pgbench-kernel-regression test end-to-end on AWS (local-orchestrator path), base kernel 6.1.141-165.249.amzn2023 vs tip 6.1.150-174.273.amzn2023, on c8i.4xlarge in us-west-2 with the al2023-ami-kernel-6.1-x86_64 AMI.

Single-VM run

  • 1/1 VM succeeded; full lifecycle exercised: install kernel A → reboot → pgbench (read-only + read-write) → install kernel B → reboot → pgbench → benchmark analysis.
  • Produced benchmark-base-.csv / benchmark-tip-.csv with the expected schema and 4 metrics: postgresql.readonly.tps, postgresql.readonly.latency_avg, postgresql.readwrite.tps,
    postgresql.readwrite.latency_avg.
  • Analyzer ran cleanly: "No regressions detected"

Multi-VM statistical comparison (5 VMs)

  • 5/5 VMs succeeded; analyzer pooled 20 base + 20 tip rows (5 VMs × 4 metrics) and ran Welch's t-test, Mann-Whitney U, and Cohen's d per metric.
  • Cross-VM variance was low (CV 0.7–1.7%), confirming stable measurements and that the per-VM aggregation works.

Combined config (all touched tests, 2 VMs each)

One config running pgbench-kernel-regression, unixbench-kernel-regression, and simple-unixbench at min_count: 2. 6/6 VMs succeeded. pgbench produced 8 base + 8 tip rows and compared correctly.

@nmanthey
nmanthey force-pushed the pgbench-kernel-AB-benchmark branch from ab17330 to b4be7da Compare August 20, 2026 08:57
@bhcopeland
bhcopeland marked this pull request as draft August 26, 2026 09:34
Add a pgbench-kernel-regression VM test that installs a base kernel,
runs a PostgreSQL 16 pgbench read-only and read-write suite, reboots into
a second (tip) kernel, re-runs the suite, and emits benchmark-base-*.csv
and benchmark-tip-*.csv for the regression analyzer to compare
(read-only/read-write TPS and average latency).

Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
@nmanthey
nmanthey force-pushed the pgbench-kernel-AB-benchmark branch from b4be7da to 4d57c0f Compare September 2, 2026 14:47
@nmanthey

nmanthey commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

I rebased the pgbench, and re-executed a c8i.4xlarge × 5 VM run:

  pgbench A/B: 6.18 LTS vs 7.2 — done, 5/5 VMs green

  Both kernels booted cleanly, pgbench ran on each, all CSVs produced.
  
  Results (mean over 5 VMs, 6.18 LTS → 7.2.2) 
  ┌──────────────────────────┬──────────┬──────────┬────────┐
  │ Metric                   │ 6.18 LTS │    7.2.2 │ Change │
  ├──────────────────────────┼──────────┼──────────┼────────┤
  │ Read-only TPS            │  454,543 │  539,750 │ +18.7% │
  ├──────────────────────────┼──────────┼──────────┼────────┤
  │ Read-write TPS           │   56,622 │   68,445 │ +20.9% │
  ├──────────────────────────┼──────────┼──────────┼────────┤
  │ Read-only latency (avg)  │ 0.040 ms │ 0.034 ms │ −15.4% │
  ├──────────────────────────┼──────────┼──────────┼────────┤
  │ Read-write latency (avg) │ 0.276 ms │ 0.228 ms │ −17.3% │
  └──────────────────────────┴──────────┴──────────┴────────┘

In case we regress in the future, I'd like to use this test to notify authors/maintainer/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant