Thread budgets and recorded laptop measurements#

The worked examples use four native threads as a practical explicit setting. Ordinary CLI commands and repertoire annotation default to the physical core count within the job CPU allocation (--threads 0). Use --threads 1 for serial execution or pass an explicit thread count. Requests above the usable allocation are capped. Samples run sequentially; native search batches the entire query population, without an outer pool. Numerical helper pools are limited to one thread before imports in the notebooks. The measurements below retain their recorded explicit budgets and scorer.

Measured commodity laptop#

The following whole-CLI measurements describe the workloads and scorer from VDJmatch 0.4.0. For timing the frozen vX scorer, use the profiling helper with the 1.3 command and the exact reference and query inputs of interest. The recorded runs used an Apple M3 Max laptop, 16 physical/logical cores and 48 GiB RAM (51.54 decimal GB). All 16 cores were available to the host; the table varies the requested native worker budget rather than asserting OS CPU affinity. The interpreter was Python 3.13.7, with vdjmatch 0.4.0, seqtree 1.1.1, vdjtools 5.1.0 and Polars 1.41.2. The pinned reference is 2026-06-11-ZENODO/vdjdb_full.txt.gz from the benchmark mirror; its SHA256 is 2d585775222f7e16c722671aed3a8b59a37473c36e671a9f13d9ed12771f6f80.

Measured whole-invocation cost; decimal GB, one fresh invocation per row#

Workload

Observations

Native workers

Time (s)

Peak tree RSS (GB)

Mean occupied cores

Peak live threads

Assayed TRB, NLV/ELA/LLL/LLW

2,670 query rows

1

13.71

0.841

0.99

6

Same complete TRB workload

2,670 query rows

4

4.69

0.846

3.01

7

Earlier baseline abundance subset, LLW target

10,000 selected clonotypes

4

21.76

3.530

3.49

9

Three complete precursor sets

22,164 usable unique junctions

4

70.81

1.049

3.39

10

Bold identifies the better measured value only within the two comparable TRB rows. These are measured examples, not fitted extrapolations or benchmark medians. The precursor input contains 34,162 source observations and 22,171 distinct raw junctions across three peptides; seven fail the model’s junction check. The earlier vaccination measurement selected the 10,000 most abundant V/junction/J clonotypes from 578,812 eligible unique clonotypes in one baseline table, representing 124,390 / 833,386 eligible read counts (14.93%). This abundance-enriched subset does not establish cost or specificity prevalence for a complete cohort. The current examples/vaccination.py runner retains valid-amino-acid junctions across every locally available donor/replicate, including flagged noncanonical anchor residues. Complete-cohort timing remains unverified: the earlier canonical-residue subset did not finish the four-worker workflow within 1,800 seconds. A twelve-worker subset probe was stopped to correct its input retention; it was not a completed cohort measurement. The host was contended. Its sampled process-tree RAM ceiling defaults to 24 decimal GB and rejects settings above 32 GB; it fails explicitly if the ceiling is exceeded.

The one/four-thread TRB evidence tables are exactly equal, including source identities, pMHC, all six component scores and unsupported observations. The measured wall-time ratio is 2.92 (13.71 / 4.69 seconds). A second clean-kernel verification gave 13.60 and 4.79 seconds, with equal evidence again and peak RSS 0.937 and 0.948 GB. Reference loading, startup and table export contribute to elapsed time, so four workers do not imply fourfold speedup.

Are extra live threads oversubscription?#

CPU seconds divided by elapsed seconds give occupied-core equivalents: 1.0 means an average 100% of one core. The four-worker examples averaged 3.01–3.49 occupied cores. Peak 50-ms sampled core equivalents were 4.19 for TRB, 4.46 for baseline annotation and 4.47 for the precursor run. Short samples include timing and CPU-accounting granularity; these measurements cannot establish a strict instantaneous four-core ceiling. They show useful multi-core work without a sustained whole-run excess over the requested native worker budget. These historical peaks are raw short-window CPU-accounting ratios. The helper now uses one-second CPU windows; delayed OS accounting can make 50-ms ratios exceed the physical core count. Mean occupied cores remains the primary usage measure. A run shorter than one second has an unavailable peak.

Live-thread counts also include main, runtime-helper and idle native/table-pool threads. Seven to ten live threads therefore do not alone imply seven to ten simultaneous CPU-bound workers. Record both CPU activity and live threads when checking a new installation; do not infer either from a version string.

Measurement scope and limitations#

examples/profile_cli.py samples the CLI and all live descendants every 50 ms, summing concurrent RSS and CPU time and recording elapsed wall time. Wall time includes CLI startup, loading, calculation and export. Notebook preparation, retained plotting arrays, the notebook kernel and figure rendering are outside the CLI tree: total interactive-session RAM will be higher. Shared pages may be counted in more than one process, and peaks between samples may be missed. CPU is an approximate sampled process-tree total. No per-query workers, computed caches or reused predictions are involved.

These observations establish the cost of the listed workloads on this host. They do not establish the complete manuscript rebuild gate or guarantee the same cost on an x86 laptop, a four-core host or a smaller-memory machine. Re-measure on the intended hardware with the same raw inputs and CLI recipe. Every biological notebook writes a fresh resource TSV beside its final tables; complete local run logs and source-identifier mappings remain private. The helper also writes resource sidecars for failed runs, with completed=false, exit code and failure kind. An incomplete run never establishes the cohort gate.