Compute linear block-combo search chunk size from block file sizes. - #970
Merged
bbuchfink merged 1 commit intoJul 1, 2026
Merged
Conversation
Contributor
Author
|
@bbuchfink Will leave this as draft PR until the clustering rerun will hit that point again (approx. in 4 days). If (as I suspect) there will be more downstream scaling issues with very-large dbs I think bundling them as one PR might make sense.. |
Owner
|
Very well, makes sense. Thanks for staying tuned. |
Owner
|
On a side note, your command will not only run linclust but all-vs-all alignment, that should be super expensive on a dataset this size and with a 90% id cutoff, meaning the first round will not reduce by that much. To save time I'd recommend to use e.g. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the fixes in #968 #965 we restarted a 48B sequence clustering run. Even though the blocks are now correctly capped at 2^32-1 sequences, we encountered another problem downstream: For the linear block-combo search, the algorithm assumes a maximum chunk size of 1024GB, which causes problems downstream.
Run logfile:
20260626_153616.log
Summary
Fixes a crash in the multinode linear search path by preventing
Search::runfrom re-splitting length-sorted input blocks.Problem
The multinode workflow first creates length-sorted block files in
len_sort()and then runs linear block-combo searches over those exactVolumedFileentries.However,
run_block_combo()previously forced:config.chunk_size = 1024;This means that a length-sorted block larger than 1024GB on disk could be split again inside the generic
Search::runpath:load_seqs(config.block_size(), ...)load_seqs(config.block_size(), ...)config.block_size()isconfig.chunk_size * 1e9For our dataset, one generated
input0.faablock was ~1.11 TB on disk. Although length sorting had already produced a representation-safe block, the fixed 1024GB search chunk size causedSearch::runto create additional internal query/reference blocks. That broke the multinode block-combo assumption that each(r, i)search operates on the already generated length-sort blocks.Fix
Instead of hardcoding 1024,
run_block_combo()now derivesconfig.chunk_sizefrom the actual block files being compared:The helper takes the larger of the database/query block file sizes and rounds it up to whole decimal GB. This keeps the search chunk size large enough that
Search::rundoes not split the length-sorted block again. This change makes the later generic search stage respect those precomputed block boundaries.Validation
We will rerun the 48B clustering and report back if this fixes it. However, we suspect more possible problems arising downstream, e.g.
greedy_vertex_cover()uses anunordered_map<string, OId>without respecting memory limits. This, as well as other iterations/maps/buffers that go over the whole input db, can cause OOM crashes on very-large dbs where whole-db sample mappings are non-trivial.