Skip to content

v0.5.0

Choose a tag to compare

@cboettig cboettig released this 10 Sep 18:42
· 112 commits to main since this release
3f07dc0

A small release with an outsized operational effect: it finishes #173 on the generator side, closes #39, and changes the scheduling defaults for every generated hex and COG pod.

If you run builds on NRP, read the Behaviour changes section first — one of these changes can turn a build that ran slowly into one that does not schedule at all.


⚠️ Behaviour changes

Hex and COG pods no longer default to opportunistic priority (#201)

Both the default and the built-in nrp profile now omit priorityClassName, giving default priority 0.

On NRP opportunistic is priority -2000000000, the lowest available, and preemption exposure scales with pod runtime — so the class was applied to exactly the pods least able to absorb it: multi-hour, un-checkpointed work that restarts from zero. Measured on a real LANDFIRE build, six identical res-10 slices spread 5× in runtime, ~7 h to a projected ~52 h, with every pod saturating its full CPU request. That is contention, not scheduler CPU starvation. The counterfactual from an earlier build is sharper still: raising priority while halving parallelism improved per-pod runtime, 117 min against 3h32m for identical work. The old default was likely slower as well as riskier.

The trade-off, stated plainly: opportunistic lets a build exceed its namespace quota. Default priority does not. A large fan-out that was relying on that will now hit the quota rather than running slowly. Check your namespace limits against your fan-out before upgrading, and pass --priority-class opportunistic to restore the old behaviour — it remains the right choice for genuinely interruptible work.

The hex fan-out's retry budget is now per index (#201)

backoffLimit: 0 is a job-wide budget: one pod failure anywhere failed the whole fan-out. It is replaced by backoffLimitPerIndex (default 2) and maxFailedIndexes (default 1), so a flaky slice retries instead of taking hundreds of healthy ones with it, and a systematic failure stops the Job rather than burning hours on the rest. Tunable via --hex-retries and --max-failed-indexes.

backoffLimit is deliberately omitted rather than set alongside these — Kubernetes ignores the job-wide budget once a per-index one exists, and emitting both would mislead anyone reading the manifest. On a cluster old enough to prune these fields the Job falls back to the API default backoffLimit: 6: weaker than intended, but not the zero-retry behaviour this replaces.

Worth being precise about what this did and did not fix. The fan-out already carried a podFailurePolicy ignoring DisruptionTarget, and preemption sets that condition — so a preempted or drained pod was always retried, without spending budget. That behaviour is preserved and now has a test. The gap this closes is every other way a multi-hour pod dies: an OOM, a truncated Ceph read, a node going away without setting the condition. Any one of those ended the run with no retry at all.

Filed against raster-workflow; the vector generator had the identical shape and is fixed with it. The merge job goes from backoffLimit: 0 to 2 — it runs after hours of hex work and a transient S3 failure should not discard it.


New: the generator can finally emit sub-h0 chunking (#173, #39)

0.4.0 gave cng-datasets raster the ability to chunk below h0 and to read only its own window of a COG, but nothing emitted either, so the memory and I/O wins were unreachable from generated output — the same gap --hex-workers closed for CNG_HEX_WORKERS in 0.4.0.

--chunk-resolution N on raster-workflow sets one hex pod's unit of work, and --max-hex-memory 8Gi picks it for you: the coarsest resolution whose estimated peak fits the budget. Coarsest rather than finest, because each extra level multiplies the pod count about sevenfold and every pod schedules, pulls the image and reads the source — optimising for memory alone would be defensible and badly wrong for everything else.

The estimate is 7 ** (h3_resolution - chunk_resolution) cells × a measured 121 bytes per cell, taken from the res-9 run in #173 because peak RSS grows sub-linearly in cell count, so extrapolating from a smaller run over-predicts. It reproduces all three measured points:

chunk unit at res 10 modelled measured
h0 31.83 GiB ~32 GiB
h1 4.55 GiB 4.6 GiB
h2 0.65 GiB 0.68 GiB

A test asserts each within 10%, so the constant cannot quietly drift from the measurement it came from. It models the cell enumeration — the term that scales with chunk size — and is reported at generation time as a floor, not a guarantee: worker memory is bounded separately, and the output-side accumulation is not modelled.

A merge step comes with sub-h0 builds. Chunks stage to hex-chunks/ and consolidate into hex/h0=*/data_0.parquet, so nothing reading the published tree ever sees half-merged parts, and the layout does not depend on how finely the build was chunked. It is wired into the workflow ConfigMap and sequenced after hex.

--backend auto routes to Armada once the chunk count passes the ~200-pod namespace guideline, and to k8s below it, saying which it chose and why. Fine chunking is what makes an external queue necessary — the same problem #183's finding 1 describes from the scheduler side, and the reason #39 was waiting on this work. An explicit --backend k8s past the guideline is warned, not overridden: silently switching what an operator asked for is the class of surprise this line of work exists to remove.

Generation now prints the whole picture before anything is applied:

  Hex completions: 49 (res-2 chunks)
  Hex pod: cpu 4, memory 4Gi, 4 workers × 100000 cells/chunk
  Chunking: res-2 cells, 49 chunks (chosen for --max-hex-memory 4Gi)
    Estimated peak per pod ≈ 0.6 GiB against a 4Gi request. This models the cell
    enumeration, which is the term that scales with chunk size — it is a floor,
    not a guarantee.
  Merge: demo-merge consolidates hex-chunks/ into hex/h0=*/data_0.parquet

Also new: --merge-memory / --merge-storage for the merge pod (16Gi / 100Gi), and --hex-retries / --max-failed-indexes for the fan-out's retry budget.


Fixed

  • A fan-out past a 50,000-chunk ceiling is refused at generation (#173). Nothing stopped --chunk-resolution 10, or a --max-hex-memory small enough to select it — and 1Ki at res 10 genuinely does select res 9, so this was reachable rather than theoretical. The generator would have tried to materialise a 282-million-entry chunk list and hung before writing a single manifest; had it succeeded it would have emitted a Job of 282 million pods. The bound is checked from 7 ** chunk_resolution before any enumeration, so the check costs nothing.

Changed

  • Chunk enumeration moved to a shared enumerate_chunk_cells, used by both RasterProcessor and the workflow generator (#173). The generator sizes a Job's completions from the list a pod indexes into; computing them separately would let them disagree, and a fan-out narrower than the list drops whole chunks with a clean exit.

Full changelog: https://github.com/boettiger-lab/datasets/blob/v0.5.0/CHANGELOG.md
Compare: v0.4.0...v0.5.0