Performance on cluster storage
How fast adata is on a cluster’s shared filesystem, where its time goes, and
what other engines and the filesystem itself do with the same work. Measured
in December 2026 with adata 0.17.7 on a production cluster: LSF jobs on
Lustre (client 2.14, DDN; inputs striped over 11 OSTs in 16 MiB
stripes), with node-local /tmp and NFS as the other tiers. The probe that
measured it is
benchmarks/lustre/,
and the numbers on this page are in its
cleaned summary.
In short:
- No engine we tried reads an h5ad faster than
adatadoes. h5py read 446 to 476 MB/s on Lustre. The best of the others, zarr reading the same HDF5 chunks with 64 reads in flight, managed 502 MB/s at three times the CPU. DuckDB and obstore were slower. - Writing an uncompressed h5ad runs at the speed of one stream. h5py wrote 483 MB/s; plain buffered writes of raw bytes, 486.
- The filesystem itself is 4 to 10 times faster than any of them, but only with direct I/O and many requests in flight, which no format library does.
- Compressed and text outputs are bound by one core, not by the
filesystem: gzip h5ad, 10x
.h5, Matrix Market and loom. - Across filesystems, node-local
/tmpis the fastest for one stream, and NFS is the one where parallel reads pay: zarr with 32 reads in flight read 3.8 times as fast as h5py there (below). - Two fixes came out of it, in 0.17.8 (#129): sparse reads of at least 32 MiB, about 3.7 times faster on a narrow matrix, and no numpy huge pages, which on some nodes made a write hundreds of times slower.
The stores
| Store | Size | Shape | Layout |
|---|---|---|---|
| Cells | 55 GB | 4.68M cells × 12,288 genes | CSR X, float64 values, int64 indices, 3.4 billion entries |
| Spatial | 6.7 GB | 4.27M bins × 480 genes | CSR X and a counts layer, float32/int32 |
| ATAC | 21.7 GB | 115,503 cells × 2,337,084 peaks | CSR X and a binary layer, int32/int32 |
All three are uncompressed, chunked as h5py chose for anndata (164 to 415 KB chunks). Some runs used a quarter or a sixteenth of the cells (or of the ATAC store’s peaks), to see how time grows with size.
What adata does today
Each command on the whole store, on Lustre, in one LSF job of 4 cores: wall time · MB/s of input read · CPU share (user + system time over wall time; near 1 the command is computing, well under 1 it is waiting for the filesystem). MB/s is left out where the input is a compressed or text file, or the command reads a small part of it. Peak memory stayed under 1.8 GB throughout.
| Command | 55 GB store | 6.7 GB store | 21.7 GB ATAC |
|---|---|---|---|
subset --obs to h5ad |
4.8 min · 192 MB/s · 0.93 | 4.9 min · 23 MB/s · 0.19 | 1.7 min · 211 MB/s · 0.96 |
subset --obs to Zarr |
8.6 min · 107 MB/s · 0.89 | 9.6 min · 12 MB/s · 0.27 | 4.1 min · 89 MB/s · 1.09 |
subset --var |
5.3 min · 173 MB/s · 0.98 | 37 s · 183 MB/s · 0.92 | 3.2 min · 112 MB/s · 0.97 |
split --by |
5.8 min · 159 MB/s · 0.94 | 2.5 min · 45 MB/s · 0.92 | 2.7 min · 134 MB/s · 0.86 |
convert to Zarr |
6.2 min · 149 MB/s · 1.42 | 1.5 min · 73 MB/s · 1.29 | 4.5 min · 81 MB/s · 1.21 |
convert to gzip h5ad |
13.5 min · 68 MB/s · 0.92 | 2.3 min · 49 MB/s · 0.95 | 9.1 min · 40 MB/s · 0.99 |
convert to 10x .h5 |
18.0 min · 51 MB/s · 0.71 | 1.1 min · 103 MB/s · 0.99 | 5.1 min · 72 MB/s · 0.96 |
convert 10x .h5 back to h5ad |
26.5 min · 0.91 | 2.2 min · 0.53 | 5.7 min · 0.95 |
convert to a 10x MTX folder |
47.5 min · 19 MB/s · 0.99 | 7.1 min · 16 MB/s · 0.99 | 13.6 min · 27 MB/s · 1.00 |
convert to loom |
5.2 min · 21 MB/s · 0.86 | ||
export sparse to .mtx.gz |
33.3 min · 28 MB/s · 0.98 | 7.5 min · 15 MB/s · 0.75 | 12.4 min · 29 MB/s · 0.99 |
import sparse from .mtx.gz |
1.3 h · 0.92 | 7.1 min · 0.95 | 22.2 min · 0.89 |
export dataframe obs |
5.0 min · 185 MB/s · 0.90 | 3.3 min · 34 MB/s · 0.39 | 9 s · 0.80 |
The 6.7 GB store’s subset --obs is the outlier: 23 MB/s, at a CPU share of
0.19. Its blocks were small reads, and it spent four fifths of its time
waiting (below). A loom output is dense, so it was made of the
6.7 GB store only.
Where the time goes
Each command profiled with pyinstrument on a quarter of the 55 GB store’s cells, and two on the 6.7 GB store. The profiled runs are separate from the table’s, so their times differ a little.
- subset, split and convert to Zarr spend most of their time in h5py’s and zarr’s reads and writes, so only a faster engine for those would speed them up, and none was faster (below).
- gzip h5ad and 10x
.h5spend 62 to 74% writing, almost all of it HDF5 compressing with gzip on one core: 65 MB/s against 483 uncompressed (below). - Matrix Market export and the 10x MTX folder spend about 40% in gzip and 40% formatting numbers as text; import spends 57% parsing text.
- loom spends 55% computing, most of it making each block of the sparse matrix dense.
- export dataframe obs spends its time decoding categorical columns and writing CSV.
The table view of this chart is the profiles list in the
summary.
Reading
The probe read 4 GB regions of the 55 GB store’s X/data and X/indices, a
different region each time, so no cache could help. It used each engine that
reads h5ad: h5py, which adata uses; zarr through a read-only view that maps
HDF5 chunks to byte ranges, so zarr can fetch many at once; DuckDB’s h5db
extension; and obstore’s ranged reads. Then it read plain byte ranges of the
same file, with no format at all.
| Reader | MB/s | CPU s |
|---|---|---|
h5py, 32 MiB reads (adata) |
446 | 7 |
| h5py, 256 MiB reads | 476 | 7 |
| zarr over HDF5 chunks, 64 in flight, 256 MiB | 502 | 21 |
| zarr over HDF5 chunks, 32 in flight, 32 MiB | 401 | 34 |
DuckDB h5db, 8 threads |
481 | 11 |
DuckDB h5db, 32 threads |
350 | 26 |
| obstore ranged reads, 64 in flight | 261 | 18 |
| Raw bytes, one stream | 2,029 | |
| Raw bytes, 4 threads | 2,504 | |
| Raw bytes, direct I/O, 16 in flight | 4,183 | |
| Raw bytes, direct I/O, 32 in flight | 5,195 |
- h5py is as fast as the parallel engines. On node-local
/tmpit was faster than all of them: 788 MB/s, against 282 for zarr and 693 for DuckDB. - The ceiling is far above it. On a good node, one plain stream of raw bytes read 2 GB/s, four times h5py. Every engine pays per chunk of 415 KB, and none of them reached the filesystem’s speed through the format.
- Direct I/O is steady across nodes. A plain stream read 629 MB/s on one node and 2,029 on another; direct I/O with 16 in flight read 3.2 to 4.2 GB/s on both. The raw rows are medians of three rounds on one node, a different node from the engines’.
- Reading ahead did not help.
lfs ladvise willneedbefore each block read 1,836 MB/s against 2,029 without it.
Writing
The probe wrote 8 GiB of values and indices, as a streaming command writes them, in blocks of 256 MiB, with an fsync at the end, three rounds in a shuffled order.
| Writer | MB/s | CPU s | On disk |
|---|---|---|---|
h5py, uncompressed (adata) |
483 (121, 483, 542) | 17 | 8.0 GiB |
| h5py, gzip (one run) | 65 | 118 | |
| Zarr v3, uncompressed | 406 | 26 | 8.0 GiB |
| Zarr v3 + zarrs, uncompressed | 539 | 48 | 8.0 GiB |
| Zarr v3 + zarrs, uncompressed, direct I/O | 439 | 47 | 8.0 GiB |
| Zarr v3, zstd | 633 | 50 | 0.95 GiB |
| Zarr v3 + zarrs, zstd | 754 | 56 | 0.95 GiB |
| Zarr v3 + zarrs, zstd, direct I/O | 897 | 55 | 0.95 GiB |
| Raw bytes, one stream | 486 | 28 | |
| Raw bytes, 8 threads | 829 | 100 | |
| Raw bytes, direct I/O, 8 in flight | 2,046 | 5 | |
| Raw bytes, direct I/O, 16 in flight | 3,222 | 5 |
- h5py writes at the speed of one buffered stream, 483 against 486 MB/s.
- gzip costs seven times the time. HDF5 compresses on one core, at 65 MB/s.
- zarrs’ direct I/O does not reach the filesystem’s. It wrote uncompressed data more slowly than without it. zstd helps because only an eighth of the bytes reach the disk; these synthetic counts compress better than most real data.
- Direct I/O is the filesystem’s fast path for writes too: 2 to 3 GB/s, at a fifth of the CPU one buffered stream costs.
Lustre, local disk and NFS
The same work on three filesystems: Lustre; the node’s local /tmp, after a
copy of the input to it; and NFS (NFSv3, 32 KB a request, on a shared filer,
which ran the 6.7 GB store and the slices only, to spare it). Each run was a
job of its own on whichever node LSF chose, so the comparisons carry some
noise from node to node.
| Work | Lustre | /tmp |
NFS |
|---|---|---|---|
Reading with h5py, 32 MiB a read (adata) |
446 | 788 | 110 |
| Reading with zarr over HDF5 chunks, 32 in flight | 401 | 282 | 415 |
Reading with DuckDB h5db, 8 threads |
481 | 693 | 127 |
Writing with h5py, uncompressed (adata) |
494 | 517 | 154 |
Writing with h5py, gzip (adata) |
65 | 76 | 68 |
| Writing Zarr v3 with zarrs, zstd, 32 threads | 824 | 1,169 | 596 |
MB/s. Lustre’s writes here are its first run, on the same node as /tmp’s.
- One stream is fastest on
/tmp: h5py read 788 MB/s there, 446 on Lustre and 110 on NFS. - NFS is where parallel reads pay. It moves 32 KB a request, so one stream waits on every one; with 32 in flight, zarr read 415 MB/s, 3.8 times h5py. zarr’s other settings on NFS read 64 to 318 MB/s, so the filer’s own load counts for as much.
- Uncompressed writes ran at about the same speed on Lustre and
/tmp, and a third of it on NFS. gzip ran at 65 to 76 MB/s on all three: one core sets its pace, not the filesystem.
Each command on the 6.7 GB store, on all three. Its Lustre and /tmp runs
mostly shared a node (node-13-24).
| Command | Lustre | /tmp |
NFS |
|---|---|---|---|
subset --obs to h5ad |
4.9 min | 5.9 min (node) | 59 s |
subset --obs to Zarr |
9.6 min | 1.6 min | 4.6 min |
export dataframe obs |
3.3 min | 57 s | 1.0 min |
subset --var |
37 s | 40 s | 1.1 min |
split --by |
2.5 min | 2.1 min | 3.2 min |
convert to Zarr |
1.5 min | 53 s | 2.5 min |
convert to gzip h5ad |
2.3 min | 1.9 min | 2.6 min |
convert to 10x .h5 |
1.1 min | 59 s | 1.4 min |
convert 10x .h5 to h5ad |
2.2 min | 1.1 min | 1.6 min |
convert to a 10x MTX folder |
7.1 min | 6.5 min | 8.1 min |
export sparse to .mtx.gz |
7.5 min | 5.5 min | 6.3 min |
import sparse from .mtx.gz |
7.1 min | 6.8 min | 6.8 min |
convert to loom |
5.2 min | 4.0 min | 4.6 min |
- Commands bound by one core take about the same anywhere: Matrix Market, the 10x MTX folder, loom and gzip are within 1.4 times of each other.
- Small reads cost most on Lustre. Before the 32 MiB floor,
subset --obstook 4.9 minutes on Lustre and 59 seconds on NFS, andexport dataframe obs3.3 minutes against about one. Each read on Lustre waits longer than on NFS or a local disk, so reading in small pieces is what Lustre punishes. /tmpis fastest for copying,convertto Zarr in 53 seconds against 1.5 minutes on Lustre, but the input has to get there first: 9 seconds for the 6.7 GB store, 2.9 minutes for the 55 GB one.- The node can matter more than the filesystem. The hollow dot,
subseton/tmp, spent 301 of its 356 seconds in the kernel, the stall described under Huge pages. Two other nodes did the same to runs of the slices: converting a sixteenth of the 55 GB store to a 10x MTX folder took 4.6 hours on/tmp(node-13-18, 4.1 hours of it system time) against 3.1 minutes on Lustre.
Text formats
DuckDB against adata on the 6.7 GB store’s X, on Lustre, with 16 threads for
DuckDB. DuckDB’s import parses and sorts the entries, then writes them into the
store’s CSR X; its export writes a gzipped Matrix Market file.
| Work | adata | DuckDB |
|---|---|---|
Export X to .mtx.gz |
4.3 min, 155 CPU s | 7.7 min, 921 CPU s |
Import X from .mtx.gz |
6.7 min, 379 CPU s | 1.2 min, 155 CPU s |
| Export obs to CSV (Lustre) | 3.0 min | 4.4 min (the anndata extension) |
Export obs to CSV (/tmp) |
62 s | 18 s |
DuckDB’s import is 5.8 times faster and uses less CPU in all: adata’s parser
is the slow part, not the format. Its export is slower than adata’s.
Block size
--chunk sets the rows a command holds at once. Up to 0.17.7 a sparse block was
--chunk rows’ worth of entries, and on a narrow matrix that is a small read:
1,024 rows of 480 genes is about 800 KB. On Lustre each read waits for the
network.
The default --chunk of 10,000 rows for export dataframe is past the bend:
1,000 rows took 8 to 20 minutes, 10,000 to a million rows 2 to 6 minutes. A
million rows held 7 GB on the 55 GB store for no gain there. For a sparse
subset, the bend was well above the default of 1,024.
From 0.17.8 (#129) a sparse block
holds at least 32 MiB of values and indices, whatever --chunk says, the
size adata already copies a dense array in. On one node, two runs of each:
| Build | --chunk |
Wall | Peak memory |
|---|---|---|---|
| 0.17.7 | 1,024 | 6.4 and 6.9 min | 814–824 MB |
| With the floor | 1,024 | 1.5 and 2.1 min | 821 MB |
| With the floor | 65,536 | 1.4 and 1.7 min | 823 MB |
Huge pages
numpy asks Linux for huge pages (2 MiB) for every array of 4 MiB or more. On a node whose memory is fragmented, the kernel’s default makes each such allocation wait while it tries to free a huge page, and fails. On one node:
| numpy’s huge pages | Work | Result |
|---|---|---|
| on (numpy’s default) | 2 GB write, Zarr | nothing written after 55 min: 3,327 s of system time, 5 s of user time |
off (NUMPY_MADVISE_HUGEPAGE=0) |
2 GB write, Zarr | 11 s, 192 MB/s |
| off | 2 GB write, h5py | 7 s, 314 MB/s |
| on, an earlier job | 8 GB write, zarrs | 4 to 6 MB/s |
The node had no free 2 MiB pages left, and its counters showed 142 million
failed compactions in 143 million. From 0.17.8
(#129), adata turns numpy’s
request off for its run, and NUMPY_MADVISE_HUGEPAGE=1 keeps it (see
Huge pages).
What was ruled out
- Parallel readers of HDF5: zarr over HDF5 chunks, DuckDB’s
h5dbandanndataextensions, obstore. None read faster than h5py; all used more CPU. - MPI parallel HDF5: the only way to write one h5ad from many processes,
but it needs an MPI build of h5py and
mpirun. Not tried. - zarrs’ direct I/O for Zarr outputs: slower uncompressed, 19% faster with zstd.
- Read-ahead hints (
lfs ladvise willneed): no faster.
What could make it faster
In order of what the measurements promise for the work:
- Compress gzip HDF5 outputs on several cores. gzip h5ad, 10x
.h5, and 10x.h5back to h5ad spend 62 to 74% compressing on one core. - Threaded gzip and faster number formatting for Matrix Market and 10x MTX output.
- A faster Matrix Market parser. DuckDB parsed and sorted the same file 5.8 times faster.
- A direct-I/O reader of HDF5 chunks: large reads of runs of chunks, many in flight. Lustre reads 4 to 5 GB/s that way, at little CPU, and the same on every node. On NFS, zarr’s parallel reads of the same chunks already read 3.8 times as fast as h5py.
- The 32 MiB floor in
concatandrecast, which still read narrow sparse matrices in small pieces.
Reproducing
The probe runs as LSF jobs from a submit host; its README says how to set it up and submit it. The summary and these charts are made from its results:
uv run python benchmarks/lustre/evidence.py summarise RESULTS PROFILES -o benchmarks/lustre/results/2026-12.json
uv run python benchmarks/lustre/evidence.py charts benchmarks/lustre/results/2026-12.json -o docs/_includes/charts