Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/skade

.nornir/append-parallel-guide.md

Parallel single-snapshot append — guide

Class: guide · Function: append_parallel. What it means for you as a caller. See append-parallel-design.md for the shape.

What it is

Table::append_parallel(&batches) (and skade::append_parallel / append_parallel_with / append_parallel_props) writes a single fast_append snapshot whose encode is fanned across all cores. Where plain append encodes the whole write into one Parquet file on one core, append_parallel splits the rows into ~one file per core (zero-copy row-aligned slices), encodes them in parallel on the gatling fork-join engine, and commits every file in one snapshot.

Use it for a lone large append — one big RecordBatch (or a few) that you want committed as one snapshot but don't want stranded on a single encoder core. It is the single-write analogue of ingest_parallel (which needs you to pre-split into groups). Compression is applied inside the parallel stage, so a zstd write is parallelised for free.

What you get back — and what changes

How to observe it

skade.append_parallel_encode (bench arm) A/Bs serial append vs append_parallel directly, reporting serial_cores_busy (~1) vs parallel_cores_busy (toward all cores), the speedup, and rows/sec for each lane. The parallel lane keeps the cores busy and runs faster on a CPU-heavy (e.g. zstd) write.

Numbers are LIGHT. The bench figures are preliminary contended-box measurements — the parallel lane is the faster one, but the authoritative ratio is owed from the idle-box Loki HEAVY sweep (issue #88), not yet recorded here.

Guarantees