BenchmarksBatch Processing Benchmarks

Batch Processing Benchmarks

Batch benchmarks time a complete directory run: parsing, SASA calculation, output writing and worker scheduling. The runs use zsasa 0.12.1, pinned comparator builds and 128 sphere points, and the comparators were measured in the same session. Rows measured with another zsasa release name it.

FreeSASA has no native directory mode, so its rows use a thin freesasa_batch wrapper around the pinned FreeSASA C API.

Throughput and memory#

Throughput against peak memory

10 threads, 128 sphere points. Points are three-run means; whiskers show one standard deviation. Higher and further left is better.
Data table

On both proteomes the zsasa bitmask modes sit in the top-left corner: the highest throughput at the lowest peak memory. The exact f64 and f32 modes are faster than FreeSASA batch and RustSASA. The comparators use 3.1 to 4.2 times the peak memory of zsasa on E. coli and 3.4 to 7.2 times on Human.

Batch throughput and memory at 10 threads

128 sphere points. Bars are three-run means; whiskers show one standard deviation. SwissProt was measured once, under the passive disk I/O policy.
Data table

E. coli AFDB#

ToolRuntime (s)Structures/sPeak RSS (MiB)vs FreeSASA batchvs RustSASAvs Lahuta bitmask
zsasa f644.45798154.23.11×1.38×0.46×
zsasa f324.38099852.13.16×1.40×0.47×
zsasa bitmask f641.5692,78456.28.82×3.92×1.32×
zsasa bitmask f321.5262,86454.89.07×4.03×1.36×
FreeSASA batch13.846316228.81.00×0.44×0.15×
RustSASA6.145711170.22.25×1.00×0.34×
Lahuta7.039621187.51.97×0.87×0.29×
Lahuta bitmask2.0712,110176.86.68×2.97×1.00×

E. coli AFDB: 4,370 structures, 10 threads, 128 sphere points.

Human AFDB#

ToolRuntime (s)Structures/sPeak RSS (MiB)vs FreeSASA batchvs RustSASAvs Lahuta bitmask
zsasa f6444.20453496.23.33×1.27×0.45×
zsasa f3243.43954391.33.39×1.29×0.46×
zsasa bitmask f6414.7291,60198.510.00×3.82×1.34×
zsasa bitmask f3214.3491,64493.610.26×3.92×1.38×
FreeSASA batch147.248160676.41.00×0.38×0.13×
RustSASA56.208420328.52.62×1.00×0.35×
Lahuta71.551330340.52.06×0.79×0.28×
Lahuta bitmask19.8051,191352.57.43×2.84×1.00×

Human AFDB: 23,586 structures, 10 threads, 128 sphere points.

The "vs" columns are runtime ratios: the comparator's runtime divided by the row's runtime.

Thread scaling#

E. coli AFDB throughput by thread count

4,370 structures, 128 sphere points. Points are three-run means with one standard deviation.
Data table

From 1 to 10 threads, zsasa f64 gains a factor of 6.6 and bitmask f32 a factor of 6.7 on a machine with 4 performance and 6 efficiency cores. Parallel efficiency is 0.95 at 4 threads and falls once the threads exceed the performance cores. FreeSASA batch does not scale beyond 4 threads.

Beyond the core count#

zsasa accepts more worker threads than the machine has cores. The benchmark machine has 10 logical CPUs, so 20 and 40 workers are overcommitted.

zsasa beyond the core count

Worker counts above the 10 logical CPUs of the benchmark machine, at 128 sphere points. Three-run means, except SwissProt, which was measured once under the passive disk I/O policy. Busy cores is CPU time divided by wall time.
Data table

On the E. coli and Human runs, extra workers change throughput by less than 3% and raise peak memory with the worker count. On SwissProt, 20 workers raise bitmask throughput by 4% and 40 workers lower it by 2%.

The "Busy cores" metric shows why. The E. coli and Human collections occupy 0.8 and 9.1 GB on disk and fit in the file cache of the 32 GB machine, and zsasa keeps 8.6 to 9.6 of the 10 cores busy on them. SwissProt occupies 119 GB, and with 10 workers the bitmask run keeps only 4.8 cores busy on average. The idle workers wait inside open(): the benchmark machine runs endpoint-security software that scans every file when it is first opened (see SwissProt AFDB). Using more workers than cores is therefore an option for runs that wait on file access, not a general setting.

Human AFDB, mmCIF input#

The mmCIF runs compare two parser paths, the generic mmCIF parser and a fast path for AlphaFold models ("AF fast"), with two input strategies, reading the whole file or memory-mapping it. All four are bitmask f32 runs of zsasa 0.12.1, and Lahuta was measured in the same session.

ToolRuntime (s)Structures/sPeak RSS (MiB)vs Lahuta bitmask
zsasa generic/read16.8061,403142.50.93×
zsasa generic/mmap16.6231,419127.50.94×
zsasa AF fast/read15.1001,56294.81.04×
zsasa AF fast/mmap14.9981,57383.81.04×
Lahuta bitmask15.6531,507354.01.00×

Human AFDB, mmCIF: 23,586 structures, 10 threads, 128 sphere points.

The AF fast path is about 4% ahead of Lahuta bitmask at about a quarter of its peak memory, and the generic parser is 6 to 7% behind. Reading and memory-mapping the input take the same time within 2% on this warm-cache run; memory-mapping has the lower peak memory, 84 against 95 MiB for the AF fast path at 10 threads and 240 against 319 MiB at 40 workers.

SwissProt AFDB#

SwissProt is the largest dataset, 550,122 structures. Each configuration was measured once, so this section reports single observations without an uncertainty estimate.

The benchmark machine scans every file when it is first opened, and this collection is too large for its files to stay cached and scanned between runs. macOS also slows that scan down while a tool reads from the same disk with the default I/O policy. The SwissProt commands were therefore run under the passive disk I/O policy (taskpolicy -d passive), for zsasa and Lahuta alike.

ToolRuntime (s)Structures/sPeak RSS (MiB)vs Lahuta bitmask
zsasa 0.12.1 f32748.801735289.20.58×
zsasa 0.12.1 bitmask f32344.0491,599291.31.26×
Lahuta bitmask433.4741,269659.51.00×

SwissProt AFDB: 550,122 structures, 10 threads, 128 sphere points.

At 10 threads zsasa 0.12.1 bitmask f32 processes the collection in 5.7 minutes at 1,599 structures/s, against 1,269 structures/s for Lahuta bitmask, at 44% of its peak memory. Exact f32 runs at 735 structures/s. Lahuta's bitmask SASA mode reads only AlphaFold models and was measured at 10 threads; it has no equivalent of worker overcommit. With 20 and 40 workers zsasa 0.12.1 bitmask f32 reaches 1,666 and 1,566 structures/s at 373 and 531 MiB.

Since 0.11.0, --passive-io requests the passive policy from within zsasa.

The same commands under the default I/O policy were measured with zsasa 0.12.1 in a separate session. Under that policy both tools were slower on this machine: at 10 threads zsasa bitmask f32 ran at 1,029 structures/s and Lahuta bitmask at 916. With zsasa 0.9.0, in July 2026, the order at 10 threads was reversed (821 against 935 structures/s). The investigation notes in the benchmark repository have the measurements behind this.

Reproducing these results#

The charts and tables on this page are generated from results/tables/batch_t10_summary.csv and batch_thread_scaling.csv in N283T/zsasa-benchmarks, which also holds the full harness and manifests.

Edit this page