hardbyte / hardbyte/postgresql-job-queue-benchmarking

awa: investigate non-monotonic throughput dip at 256 workers

Ouverte
#7 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
HTML
Étoiles
2
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par inspecter results/2026-05-01-awa-extended-scaling/ et la configuration du benchmark pour l’exécution avec 256 workers. Relancez la charge de travail avec le wait-event sampler mentionné dans l’issue, puis comparez les attentes connection-acquire et LWLock/Lock selon le nombre de workers. Le travail est considéré comme terminé lorsque la cause probable est identifiée et qu’il a été vérifié si la modification de max_connections ou de la taille du pool déplace la baisse.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
postgresql
Domaine
databases, performance
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.