Repository navigation
Spatial lookup: 2000-point sub-batches (was 500); rate shown per minute - #261
Merged
Merged
Conversation
Each sub-batch is a celery task whose result stays in redis for
result_expires (a day). With chunk-grouped lookups a 500-point sub-batch
takes ~2 s, so a 337M-row upload made ~1.35M tasks: ~850 MB of results on
minnie's 1 GB Memorystore instance, ~1,200 connections, 14 MB/s and 7-9k
commands/s (2026-10-26), memory rising 15 points every 40 min. 2000 points
(~290 storage chunks, ~8 s, far inside the spatial queue's 300 s
visibility timeout) makes 4x fewer tasks, results and messages. The
default is now one constant used by the upload chain and the API.
The spatial workflow page appended "rows/sec" to processing_rate, which
the backend stores per minute ("410506.00 rows/minute"); it now says
rows/min.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Larger sub-batches
Since #257, a 500-point spatial sub-batch takes about 2 s. Each sub-batch is a Celery task, and its result stays in Redis for
result_expires(a day). A 337M-row upload on minnie (2026-10-26) therefore made about 1.35M tasks, and on the 1 GB Memorystore instance that meant:The default is now 2000 points: about 290 storage chunks and about 8 s per task, still far inside the spatial queue's 300 s visibility timeout. That is 4× fewer tasks, results and messages. The upload chain and the API now both read one constant,
DEFAULT_SUPERVOXEL_BATCH_SIZE.The batch size is fixed when a lookup starts, so this applies to runs started after deployment.
Rate label
The spatial workflow page appended "rows/sec" to
processing_rate, but the backend stores that value per minute ("410506.00 rows/minute"). The page now says rows/min.Tests
The full suite passes locally on fresh PostGIS 18 and Redis: 514 passed, 2 skipped.
🤖 Generated with Claude Code