Closed-loop `--no-tui` reaches 3x of open loop with `-q`

Aperta
#916 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
28/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
performance

Direzione di ricerca

Reproduce with the documented taskset ... oha --no-tui ... -q <rate> command against a local server, then compare the two paths: fast::work_until (per-thread current-thread runtimes) and work_until_with_qps on the shared multi-thread runtime. Read the rate-limiting/scheduling code around those entry points and profile where offered rate is lost at high rps; #910 is referenced as related. Done means -q achieves close to the offered rate at the levels where it now plateaus near 500k rps. Expected to need async-runtime and benchmarking expertise.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On our setup, -q runs stop scaling at about 500k rps, whatever the server. Closed-loop --no-tui runs on the same machine reach 1.4M rps.

This was discovered during benchmarking of relic_native, but I have chosen to recreate with dusty to be certain, as I'm the maintainer of the former.

Setup

oha 1.17.0 on GCP c4-standard-48 (Xeon Platinum 8581C), Linux 7.0. Server and oha run in separate network namespaces over veth, server on CPUs 0-8, oha on 9-17. HTTP/1.1 keep-alive, with a plaintext response.

taskset -c 9-17 oha --no-tui --output-format json --worker-threads 8 -c 64 -z 5s [-q <rate>] http://<server>/plaintext
server (closed-loop rps) -q offered achieved achieved / offered
dusty, 8 executors (1,444k) 722k 482k 67%
1,083k 492k 45%
1,299k 491k 38%
1,444k 496k 34%
hyper, 1 worker (263k) 132k 131k 99%
237k 237k 100%
263k 260k 99%

Possible cause

Closed loop with --no-tui takes fast::work_until, which runs one current-thread runtime per thread. -q takes work_until_with_qps on the shared multi-thread runtime. Seems related to #910, but the issue was the same before 1.7.0.

Lingua principale
Rust
Stelle
10.7k
Fork
311
Merge medio
24m
PR unite (30g)
6

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hatoo/oha

Tutte le issue di hatoo/oha

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.