hardbyte / hardbyte/postgresql-job-queue-benchmarking

awa: investigate non-monotonic throughput dip at 256 workers

オープン
#7 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
HTML
スター
2
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

The 2026-05-01 awa-extended-scaling run
([`results/2026-05-01-awa-extended-scaling/`](https://github.com/hardbyte/postgresql-job-queue-benchmarking/tree/main/results/2026-05-01-awa-extended-scaling))
shows a real non-monotonic dip:

| workers | throughput |
|---:|---:|
| 128 | 6,481 |
| **256** | **4,800** |
| 512 | 5,344 |
| 1,024 | 7,837 |

Each point is a 75 s clean phase median over ~15 samples — well above
measurement noise. The dip is reproducible.

Two plausible causes:

- **Connection-pool saturation around 256.** awa's claim path holds
a connection per active worker; postgres `max_connections=400` is
only ~1.5× the worker count, so contention on connection acquire
goes up sharply right around here.
- **`LWLock` / `Lock` contention** on the queue ring metadata at
some specific concurrency, transitioning back to no-contention
once workers fan out past the cliff.

Both are testable with the wait-event sampler that's about to land
(see #?). Re-running with that instrumentation will surface whether
256 sits on a `LWLock` cliff or a connection-acquire wait, and
whether bumping `max_connections` or pool size shifts the dip
location.

Not a blocker — peak throughput at 1,024 is still the highest in the
run — but worth understanding before publishing "awa scales linearly"
as a claim.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by inspecting results/2026-05-01-awa-extended-scaling/ and the benchmark configuration for the 256-worker run. Re-run the workload with the wait-event sampler mentioned in the issue, then compare connection-acquire and LWLock/Lock waits across worker counts. Done means identifying the likely cause and testing whether changing max_connections or pool size shifts the dip.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
postgresql
領域
databases, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。