Skip to content

Zoekt: Fix concurrency limit

Dmitry Gruzd requested to merge fix-zoekt-concurrency-limit into master

What does this MR do and why?

This MR fixes the concurrency limit logic for Zoekt. To figure out the number of tasks we take the concurrency limit and subtract number of in progress tasks. I believe this causes reduced throughput.

Example:

  • 20 tasks in the queue, concurrency limit: 10
  • Node finishes with 5 tasks
  • During the next task API requests we only send 5 tasks (10-5), but if we're unfortunate enough, these tasks are going to be the ones we already have in-progress, which means that our throughput is now 50% of theoretical maximum

Instead, we should always send the tasks to fill up the concurrency limit. Zoekt indexer is going to skip the in-progress tasks and maintain throughput.

Relates to #479329 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by John Mason

Merge request reports

Loading