Performance tuning
Tune threads, sensitivity flags, and database caching to speed up a BLAST run.
Speed up a BLAST run by tuning threads, sensitivity flags, database caching, and output format. -num_threads most affects wall-clock time — set it to the available vCPUs without oversubscribing, then trade sensitivity for speed via -word_size and -evalue as needed.
Where these commands run
You cannot open a shell on the platform yourself. The commands on this page are BLAST+ command lines: ask Ivy in chat to run them in the chat's code workspace, which ships BLAST+, or run them on your own machine. For a hosted search with no commands, see the BLAST quickstart.
CPU and threads
- Set
-num_threadsto available vCPUs; avoid oversubscription. - Prefer fewer threads with higher
-word_sizeif IO is the bottleneck.
Sensitivity vs. speed
- Faster: increase
-word_size, raise-evalue, cap-max_target_seqs. - More sensitive: decrease
-word_size, lower-evalue, adjust gap penalties. - For protein searches, benchmark
-matrixchoices (e.g., BLOSUM62 vs. BLOSUM45).
Caching databases
- Keep databases on an attached volume, not
/tmp. - Reuse
inputs/db/<name>_<version>across runs; avoid rebuilding. - For repeat queries, warm caches by running a tiny query before the batch.
Output formatting cost
- Tabular
-outfmt 6is fastest; JSON-outfmt 15is heavier but structured. - Avoid writing to stdout; direct
-outto a file on the attached volume.
Monitor and summarize
- Capture runtime and CPU stats per query; surface slowest queries in
SUMMARY.json. - Keep BLAST version, database checksums, and command-line flags with outputs for reproducibility.
Was this page helpful?