Conversation
Splits fastp's processing time by kind of work (gzip decompression, parsing and per-read QC, gzip compression, writing) by running the same binary on the same reads with codec stages switched off: gz/plain/BGZF input x gz/plain/no output. Adds standalone codec baselines (ISA-L, libdeflate, pigz, rapidgzip, bgzip) as ceilings, a per-thread CPU sampler (threadcpu.py, opt-in from bench_full.py) to show a pinned reader thread, and decompose.py to attribute wall and CPU per stage. bench_full.py: digest plain (non-.gz) outputs with cat, and allow runs with no -o. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task
rsplit('-') merged fp-write and fp-bgzf into 'fp' and fp-read-L/R into one role.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Piping decompressed output through wc -c capped parallel decompressors (bgzip, rapidgzip) at ~2.5 GB/s on n2d-highmem-48; the uncompressed size is already known. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four complete public datasets at -w 16/48, 9 I/O variants, 2 reps: per-read work is ~75% of CPU, codecs 20-30%; -w 48 is slower than -w 16 on 3 of 4 datasets; BGZF input does not help. Output digests identical across all 72 variant/thread cells. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #9. Splits fastp's processing time by kind of work: gzip decompression, parsing and per-read QC, gzip compression, and writing. #9 splits it by stage in time. This split decides which optimisations can pay off.
What it adds (
benchmark/codec-io.mdhas the method, how to read it, and the results):scripts/io_variants.sh: the same binary on the same reads with codec stages switched off. Inputs are gz, plain, or BGZF; outputs are gz, plain, or none.plain_noneis the per-read compute floor. The one-off cost of making the plain and BGZF inputs goes toprep.tsv.scripts/codec_baselines.sh: standalone codec MB/s per thread count (ISA-L, libdeflate levels 1/4/6, pigz, rapidgzip, bgzip).scripts/threadcpu.py: per-thread CPU sampler, opt-in frombench_full.pyviaFASTP_BENCH_THREADS_JSON.scripts/decompose.py: per-stage wall and CPU differences, the single-thread reader ceiling, busiest threads, and a check that output digests don't differ across I/O modes.bench_full.py: digests plain outputs and allows runs with no-o. TSV columns unchanged.Results (n2d-highmem-48, 4 complete public datasets,
-w 16/48, 9 variants × 2 reps; data inbenchmark/results/codec-io-2026-09/):-w 48is slower than-w 16on 3 of 4 datasets (atac 200 → 270 s) and costs 25–45% more CPU. The box is 24 cores × 2 SMT threads.Source facts (in
codec-io.md):.gzinput is inflated and parsed by one thread per mate.max(1, (nproc − (-w+4)) / gz_inputs), which is 1 thread at-w ≥ 44on 48 vCPUs.Self-review fixes already in:
fp-write/fp-bgzfwere merged into one role)./dev/null; piping throughwccapped them at ~2.5 GB/s.🤖 Generated with Claude Code