quickwit-oss / quickwit-oss/quickwit

Indexer and DocProcessor run on one thread [tokio issue]

Open
#4,103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug high-priority
Dominant language
Rust
Stars
11.7k
Forks
597
Avg merge
2d 22h
Merged PRs (30d)
37

Description

Indexer and DocProcessor run on one thread, due to bad tokio scheduling (lifo slot).

Quickwit has 2 runtimes, one for blocking and one for non-blocking operations. The blocking runtime in this scenario has 14 threads assigned, which don't get utilized.

[quickwit-common/src/runtimes.rs:86] &config = RuntimesConfig {
    num_threads_non_blocking: 2,
    num_threads_blocking: 14,
}

disable_lifo_slot fixes the issue, but it's an tokio_unstable feature

Hotspot image, with filter on the single thread. Doc processing and indexing happens serialized on one thread (Blue/Orange pattern).

one_thread

tokio-console shows DocProcessor get's barely polled.

one_thread2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in quickwit-common/src/runtimes.rs around the RuntimesConfig at line 86, then review the Tokio runtime setup and the disable_lifo_slot limitation described in the issue. Use the Hotspot and tokio-console observations as the baseline; done means indexing and document processing are no longer serialized on one thread and the configured blocking threads are utilized.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.