Skip to content

Docs: performance on cluster storage, and the Lustre probe behind it - #130

Merged
Claptar merged 5 commits into
devfrom
perf/lustre-probe
Dec 3, 2026
Merged

Claptar merged 5 commits into
devfrom
perf/lustre-probe

Conversation

@Claptar

@Claptar Claptar commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

A storage and engine probe for LSF clusters, the results of running it on Lustre, and a new reference page, Performance on cluster storage, that sets out the evidence with charts. The two fixes the probe led to are in #129; this PR is the measurements and the page.

What the page shows

  • No engine we tried reads an h5ad faster than adata's h5py path.
    • h5py: 446–476 MB/s on Lustre.
    • zarr reading the same HDF5 chunks, 64 in flight: 502 MB/s, at three times the CPU.
    • DuckDB h5db and obstore were slower.
    • On node-local /tmp, h5py was the fastest outright.
  • Uncompressed writes run at the speed of one buffered stream: h5py 483 MB/s, raw bytes 486.
  • The filesystem itself is 4–10× faster, but only with direct I/O and many requests in flight:
    • reads: 2.0 GB/s with one stream on a good node, 4.2–5.2 GB/s with direct I/O;
    • writes: 2–3 GB/s with direct I/O.
    • No format library reached that.
  • Where time goes (pyinstrument profiles):
    • gzip h5ad and 10x .h5 spend 62–74% compressing on one core;
    • Matrix Market spends ~40% in gzip and ~40% formatting text;
    • the MTX import spends 57% parsing.
  • DuckDB imports MTX 5.8× faster than adata, and uses less CPU in total. adata's export is faster than DuckDB's.
  • --chunk sweeps: the default of 10,000 rows for export dataframe is fine; the sparse-subset sweep is what led to Read sparse blocks of at least 32 MiB; turn off numpy's huge pages #129's 32 MiB floor.
  • Before and after Read sparse blocks of at least 32 MiB; turn off numpy's huge pages #129 on one node: 6.4–6.9 min against 1.5–2.1 min at the same memory.
  • The huge-page case: a 2 GB write had written nothing after 55 min with numpy's default, and took 11 s with huge pages off.
  • What was ruled out, and what could make adata faster, in order:
    1. parallel gzip;
    2. threaded gzip for MTX;
    3. a faster MTX parser;
    4. a direct-I/O chunk reader;
    5. the floor in concat and recast.

What's in it

  • benchmarks/lustre/: Jobs A–F, a new commit on top of the original probe.
    • pyinstrument profiles;
    • --chunk sweeps that can run another build of adata;
    • a raw-filesystem ceiling test;
    • repeat write rounds with zarrs' direct I/O;
    • per-part submission and host pinning.
  • benchmarks/lustre/evidence.py: turns a run into a cleaned summary (benchmarks/lustre/results/2026-12.json) and the page's five charts.
    • The raw results name the inputs' locations and the probe's folders. The summary keeps only the numbers, with the inputs named by shape.
  • docs/reference/cluster-storage.md: the page.
    • Charts are SVG in docs/_includes/charts, included inline so each mark has a tooltip; tables carry the same numbers.
    • Linked from the Reference index, Benchmarks (and its template) and the pipelines guide.
    • Testing moves to nav_order 8.

For reviewers

  • Not built locally. I couldn't run Jekyll here: the local Ruby is too old for github-pages.
    • The charts were checked as rendered SVG images and with the palette validator. Adjacent colours pass; three are under 3:1 contrast, which is why every chart has a table.
    • The {% include %} inside <figure markdown="0"> is the one construct new to the site. The SVGs have no blank or indented lines, so kramdown should pass them through whole. It is worth a look on the Pages preview.
  • Links point at main. The page links to benchmarks/lustre/ on main, where they resolve once dev reaches it.
  • The page describes Read sparse blocks of at least 32 MiB; turn off numpy's huge pages #129's changes. It names the PR rather than a release, since the release isn't decided.
  • The raw run reports are not committed. report-12022121.md and report-12031056.md stay local.

tests/test_docs_are_accurate.py and tests/test_release_pipeline.py pass locally (618).

🤖 Generated with Claude Code

Claptar and others added 3 commits December 2, 2026 21:16
Times today's adata on big h5ad files across Lustre, node-local /tmp and
NFS, with 1/4 and 1/16 slices for the slopes, and compares read, write and
text engines: h5py, a zarr view of HDF5 chunks (zarr-python and obstore),
zarrs, and DuckDB's h5db and anndata extensions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What the first runs on the farm showed the probe needed.

- Profiles with pyinstrument (measure.py --profile), which samples from
  inside the process: py-spy needs ptrace, and LSF nodes refuse it.
  Job A gains export dataframe var.
- Job E (job_chunks.sh, PARTS=chunks): one command at several --chunk
  sizes, rounds in alternating order. WHAT picks export dataframe obs or
  subset --obs; ADATA and TAG run another build of adata under its own
  step names.
- Job F (ceiling.py, job_ceiling.sh, PARTS=ceiling): what one node reads
  and writes with plain byte ranges, buffered against O_DIRECT at several
  depths, read-ahead hints, several processes and two files at once.
- Job C (io_write.py): zarrs' direct I/O trials, --rounds in a shuffled
  order, the host and numpy's huge-page setting on each row, a work
  folder per job, WRITE_GB and WRITE_TAG.
- submit.sh submits one part at a time (PARTS=profile, chunks, ceiling,
  write) after AFTER, and keeps jobs off AVOID_HOSTS or on ON_HOST.
- report.py: tables for Jobs E and F, and the host in Job C's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reference page on what the Lustre probe measured: each command on the
three stores, where its time goes, the read and write engines against
the filesystem's own speed, DuckDB on the text formats, --chunk, the
32 MiB sparse floor and numpy's huge pages, what was ruled out and what
could make adata faster.

- benchmarks/lustre/evidence.py makes a cleaned summary of a run
  (benchmarks/lustre/results/2026-12.json) and the page's five charts
  from it. The summary keeps the numbers and drops every path: the raw
  results name the inputs' locations and the probe's folders. Each
  profile is reduced to its shares of reading, writing, compressing,
  text and other computing.
- The charts are SVG in docs/_includes/charts, included inline so each
  mark's tooltip works; the page's tables carry the same numbers. Colours
  are the reference palette's first five slots, checked with its
  validator (adjacent pairs pass; three are under 3:1, hence the tables).
- Linked from the Reference index, Benchmarks (and its template) and
  the pipelines guide. Testing moves to nav_order 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings December 3, 2026 23:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T23:13:17.181016Z 8c6968b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c6968b60c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread benchmarks/lustre/evidence.py Resolved
Comment thread benchmarks/lustre/layout.py Resolved
Claptar and others added 2 commits December 3, 2026 23:15
…decoded

- evidence.py: a --chunk run that exited non-zero was averaged into the
  sweep and the floor chart like any other, so a refusal or a failed
  write ended early and read as a faster block size. It is counted now
  ("failed", and "chunks_failed" for a size with no successful run) and
  never timed. This run had none; the charts are unchanged.
- layout.py: a categorical obs or var index was read as its categories,
  which are in another order and may include unused ones, so the half and
  first-quarter selections took the wrong rows and n_obs was wrong. The
  categories are taken by the codes now, in row order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page showed Lustre alone, though the probe ran the same work on the
node's /tmp and on NFS. A new section, with two charts and their tables:

- Reading and writing by filesystem: h5py, zarr and DuckDB reads; h5py
  (uncompressed and gzip) and zarrs writes. /tmp is fastest for one
  stream (h5py 788 MB/s, against 446 on Lustre and 110 on NFS); NFS is
  where parallel reads pay (zarr with 32 in flight, 3.8 times h5py); gzip
  runs at 65-76 MB/s everywhere, bound by one core.
- Each command on the 6.7 GB store on all three, a dot per filesystem on
  a log scale. Commands bound by one core take about the same anywhere;
  small reads cost most on Lustre; and a run its node held up (most of
  its time in the kernel, five times the system time of the same work
  elsewhere) is drawn hollow and named.

The summary keeps each command's user and system time, and the writes of
every tier, grouped by tier as well as host: Lustre's first write run and
/tmp's shared a node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Claptar Claptar mentioned this pull request Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Test Results (py3.13)

3 838 tests   3 826 ✅  5m 45s ⏱️
    1 suites     12 💤
    1 files        0 ❌

Results for commit 4f9af08.

@Claptar
Claptar merged commit 098a8b0 into dev Dec 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants