• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / inference-perf / 42306632534
87%

Build:
DEFAULT BRANCH: main
Ran 06 Nov 2026 10:53PM UTC
Jobs 1
Files 140
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Nov 2026 10:41PM UTC coverage: 85.976% (+0.06%) from 85.918%
42306632534

push

github

web-flow
cleanup: Start load generator workers with forkserver instead of fork (#526)

Part of #305

Workers were forked from a process that runs an event loop and executor
threads. A child forked from a multi-threaded process can deadlock on a
lock another thread held. Python 3.12+ raises a DeprecationWarning for
that fork, which the default filters hide outside pytest or `-W`. On
3.14, where forkserver is the Linux default, main's session replay runs
crash at worker start because the payload does not pickle. Workers now
start from one pinned forkserver context on every Python version, and
the whole worker payload (client, datagen, tokenizer, IPC objects)
pickles.

The forkserver preloads the package, so workers fork with it already
imported, and the parent keeps worker startup out of the run clock. Each
worker still unpickles its own copy of the datagen and tokenizer, which
fork shared copy-on-write. Measured with the synthetic datagen, gpt2
tokenizer and mock server on Python 3.13, Linux. Startup is first log
line to all workers ready. PSS is the peak over the whole process tree.

| workers | startup, no preload | startup, preloaded | PSS, fork (main)
| PSS, forkserver |
|---|---|---|---|---|
| 4 | 6.9 s | 2.7 s | 0.91 GB | 1.41 GB |
| 8 | 11.6 s | 3.3 s | 0.95 GB | 1.82 GB |

Changes:
* Add `inference_perf/utils/mp_context.py` with a single forkserver
context. Every queue, value, event, manager and the `Worker` class come
from it, since mixing contexts raises at transfer time. Drop the macOS
`set_start_method("fork")` workaround.
* `start_forkserver()` preloads the load generator module with
jemalloc's background thread off (`JE_ARROW_MALLOC_CONF`). pyarrow
starts that thread on import, and Python 3.13.13 also preloads the CLI
script, so without this the server forked every worker from a
multi-threaded process.
* Session replay datagens (OTel, Weka, synthetic agentic) no longer
store the `SyncManager`, which does not pickle. They keep only the queue
proxy ... (continued)

85 of 93 new or added lines in 6 files covered. (91.4%)

1 existing line in 1 file now uncovered.

13451 of 15645 relevant lines covered (85.98%)

0.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
17.57
-0.27% inference_perf/main.py
1
57.53
1.13% inference_perf/client/modelserver/otel_instrumentation.py
1
96.3
inference_perf/utils/mp_context.py
1
94.44
0.1% inference_perf/utils/request_queue.py

Coverage Regressions

Lines Coverage ∆ File
1
17.57
-0.27% inference_perf/main.py
Jobs
ID Job ID Ran Files Coverage
1 42306632534.1 06 Nov 2026 10:53PM UTC 140
85.98
GitHub Action Run
Source Files on build 42306632534
  • Tree
  • List 140
  • Changed 9
  • Source Changed 8
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42306632534
  • 07b1252f on github
  • Prev Build on main (#42297162286)
  • Next Build on main (#42306871048)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc