Skip to content

index: enable shard merging by default#798

Merged
stefanhengl merged 2 commits into
mainfrom
sh/enable-shard-merging
Aug 1, 2024
Merged

index: enable shard merging by default#798
stefanhengl merged 2 commits into
mainfrom
sh/enable-shard-merging

Conversation

@stefanhengl

@stefanhengl stefanhengl commented Jul 31, 2024

Copy link
Copy Markdown
Member

Relates to SPLF-175

This enables shard merging by default for zoekt-sourcegraph-indexserver.

Sourcegraph has been using shard merging in production for several years. We have recently confirmed significant performance improvements for queries which are bound by matchTree construction.

I also remove -merge_max_priority because we have stopped using it.

Use SRC_DISABLE_SHARD_MERGING to disable shard merging.

Test plan:
mostly CI, I did some manual testing to confirm that shard merging is enabled by default for zoekt-sourcegraph-indexserver.

@cla-bot cla-bot Bot added the cla-signed label Jul 31, 2024
@stefanhengl stefanhengl requested a review from keegancsmith July 31, 2024 15:44
@stefanhengl stefanhengl marked this pull request as ready for review July 31, 2024 15:44
Comment on lines 1241 to 1242
fs.Int64Var(&rc.targetSize, "merge_target_size", getEnvWithDefaultInt64("SRC_MERGE_TARGET_SIZE", 2000), "the target size of compound shards in MiB")
fs.Int64Var(&rc.minSize, "merge_min_size", getEnvWithDefaultInt64("SRC_MERGE_MIN_SIZE", 1800), "the minimum size of a compound shard in MiB")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to change the defaults here since we may have lots of environments which only ever created much smaller shards so may have very low memory limits?

@stefanhengl stefanhengl Aug 1, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this on Zoom. Sourcegraph Cloud instances have a minimum 4GB MEM for indexserver, so the current limits should be ok. Self-hosted customers should have at least a comparable configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants