Individual skill
io-bound-data-processing
Processing, transforming, or moving datasets that may exceed RAM on a single low-compute box — covers memory discipline (streaming, generators, dtype shrinkage), I/O access patterns (sequential vs random, mmap, async), data formats (Parquet vs CSV vs JSON, predicate pushdown), chunking & batching, spill-to-disk (external merge sort, DuckDB/Polars), pipelining (bounded queues, backpressure, checkpointing), codec selection (zstd/lz4/gzip), concurrency for I/O-bound workloads (asyncio, threads, prefetch), and observability (iowait vs CPU%, rows/sec, py-spy/strace). Trigger on "process a large file", "stream this", "out-of-core", "OOM kill", "this is slow", or code with `pd.read_csv` of multi-GB files, `requests.get(...).content` on big bodies, `BytesIO` on unbounded inputs, per-row INSERTs, sequential `requests.get` loops, falling `tqdm` rates — even if I/O or memory isn't mentioned. Complement to computer-science-algorithms.
skills/.experimental/io-bound-data-processing/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
- operations Derived category
- writing Derived category
- data Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 11,049 bytesSKILL.mdcore · 13,506 bytesSKILL.mdcore · 13,506 bytesassets/templates/_template.mddoc · 1,732 bytesmetadata.jsonasset · 1,561 bytesreferences/_sections.mddoc · 2,589 bytesreferences/batch-coalesce-writes-with-buffered-output.mddoc · 3,364 bytesreferences/batch-keyset-pagination-over-offset.mddoc · 3,493 bytesreferences/batch-pick-chunk-size-by-memory-budget.mddoc · 3,150 bytesreferences/batch-process-with-stable-iterators.mddoc · 3,079 bytesreferences/batch-use-vectorized-apis-not-row-loops.mddoc · 2,914 bytesreferences/codec-dictionary-encoding-for-repetitive-strings.mddoc · 3,520 bytesreferences/codec-prefer-binary-protocols-over-json-for-rpc.mddoc · 3,568 bytesreferences/codec-train-a-zstd-dictionary-for-many-small-payloads.mddoc · 3,517 bytesreferences/codec-zstd-or-lz4-as-defaults-not-gzip.mddoc · 3,083 bytesreferences/conc-asyncio-for-many-network-streams-not-for-cpu.mddoc · 3,782 bytesreferences/conc-overlap-compute-with-prefetch.mddoc · 3,566 bytesreferences/conc-thread-pools-for-blocking-io-libraries.mddoc · 3,484 bytesreferences/conc-tune-parallelism-to-the-bottleneck.mddoc · 3,700 bytesreferences/fmt-avoid-deeply-nested-json-for-hot-paths.mddoc · 2,734 bytesreferences/fmt-columnar-for-analytical-scans.mddoc · 2,406 bytesreferences/fmt-line-delimited-for-streaming-row-ingest.mddoc · 2,432 bytesreferences/fmt-prefer-schema-on-write-when-possible.mddoc · 2,869 bytesreferences/fmt-push-predicates-into-the-reader.mddoc · 2,991 bytesreferences/io-async-for-many-concurrent-streams.mddoc · 2,692 bytesreferences/io-batch-and-pipeline-network-roundtrips.mddoc · 3,016 bytesreferences/io-buffer-explicitly-for-small-records.mddoc · 2,399 bytesreferences/io-mmap-for-random-or-shared-large-files.mddoc · 2,769 bytesreferences/io-prefer-sequential-over-random.mddoc · 3,045 bytesreferences/io-stream-http-bodies-with-iter-content.mddoc · 4,378 bytesreferences/io-zero-copy-when-moving-bytes-as-is.mddoc · 2,963 bytesreferences/mem-bound-the-working-set.mddoc · 2,881 bytesreferences/mem-prefer-generators-over-lists-for-pipelines.mddoc · 2,157 bytesreferences/mem-release-references-explicitly.mddoc · 2,791 bytesreferences/mem-shrink-dtypes-before-loading.mddoc · 2,107 bytesreferences/mem-stream-dont-slurp.mddoc · 2,199 bytesreferences/mem-use-views-not-copies.mddoc · 2,408 bytesreferences/obs-instrument-throughput-rows-per-second.mddoc · 3,659 bytesreferences/obs-measure-iowait-not-just-cpu.mddoc · 3,349 bytesreferences/obs-profile-with-py-spy-or-strace-for-syscall-storms.mddoc · 4,647 bytesreferences/pipe-apply-backpressure-from-slow-stages.mddoc · 3,737 bytesreferences/pipe-checkpoint-progress-for-resumability.mddoc · 4,061 bytesreferences/pipe-prefer-pull-iteration-over-push-callbacks.mddoc · 3,355 bytesreferences/pipe-use-bounded-queues-for-producer-consumer.mddoc · 2,951 bytesreferences/spill-external-merge-sort-when-data-exceeds-ram.mddoc · 3,746 bytesreferences/spill-partition-by-hash-for-out-of-core-groupby-join.mddoc · 3,501 bytesreferences/spill-use-engines-that-spill-automatically.mddoc · 3,620 bytesreferences/spill-use-temp-files-not-process-memory.mddoc · 3,207 bytes
Read excerpt
# Community I/O-bound data processing on constrained resources Best Practices
A reference for engineers processing datasets larger than RAM on a single low-compute box. Organized by execution-lifecycle impact: rules near the top of the table govern *whether the job runs at all*; rules near the bottom shave the last 10 %. Optimize from the top of the waterfall.
**Scope:** the patterns that show up in real ETL / data-engineering / batch work on a laptop, a 2-vCPU container, or a Raspberry Pi-class node — streaming, formats, chunking, spill, backpressure, codecs, and the concurrency model that actually matches an I/O-bound bottleneck. Out of scope (covered elsewhere): the algorithmic primitives themselves (see [`computer-science-algorithms`](../computer-science-algorithms/)), distributed compute beyond a single box (use Spark/Dask), and database-engine internals (see official docs).
Distilled from [Apache Arrow / Parquet docs](https://arrow.apache.org/docs/), [Polars User Guide](https://docs.pola.rs/), [DuckDB docs](https://duckdb.org/docs/), [pandas — Scaling to large datasets](https://pandas.pydata.org/docs/user_guide/scale.html), Linux man pages ([mmap(2)](https://man7.org/linux/man-pages/man2/mmap.2.html), [sendfile(2)](https://man7.org/linux/man-pages/man2/sendfile.2.html), [posix_fadvise(2)](https://man7.org/linux/man-pages/man2/posix_fadvise.2.html)), Brendan Gregg's [USE method](https://www.brendangregg.com/usemethod.html) and *Systems Performance*, Kleppmann's [*Designing Data-Intensive Applications*](https://dataintensive.net/), and the [zstd](https://github.com/facebook/zstd) / [lz4](https://github.com/lz4/lz4) reference benchmarks.
## When to Apply
Reach for these rules when:
- A job OOM-kills, swaps, or runs much slower than expected on a small box
- Input is *larger* than RAM and you need to scan, filter, aggregate, sort, or join it
- A pipeline has unbounded buffers between stages, or memory grows linearly during a "streaming" job