Index of every page on this site: llms.txt
All skills
github avatar

/search-speed-optimization

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

Diagnoses and fixes slow Qdrant search. Use when someone reports 'search is slow', 'high latency', 'queries take too long', 'low QPS', 'throughput too low', 'filtered search is slow', or 'search was fast but now it's slow'. Also use when search performance degrades after config changes or data growth.

  • 1 file
  • 4.6 KB
  • Updated 7 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/github/awesome-copilot/search-speed-optimization

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈82 tokens for metadata: the name and description. ≈1.1k when used: this file.

Description uses 4.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈337 characters, or 4.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Diagnose a problem

There the multiple possible reasons for search performance degradation. The most common ones are:

  • Memory pressure: if the working set exceeds available RAM
  • Complex requests (e.g. high hnsw_ef, complex filters without payload index)
  • Competing background processes (e.g. optimizer still running after bulk upload)
  • Problem with the cluster (e.g. network issues, hardware degradation)

Single Query Too Slow (Latency)

Use when: individual queries take too long regardless of load.

Diagnostic steps:

  • Check if second run of the same request is significantly faster (indicates memory pressure)
  • Try the same query with with_payload: false and with_vectors: false to see if payload retrieval is the bottleneck
  • If request uses filters, try to remove them one by one to identify if a specific filter condition is the bottleneck

Common fixes:

Can't Handle Enough QPS (Throughput)

Use when: system can't serve enough queries per second under load.

Filtered Search Is Slow

Use when: filtered search is significantly slower than unfiltered. Most common SA complaint after memory.

  • Create payload index on the filtered field Payload index
  • Use is_tenant=true for primary filtering condition: Tenant index
  • Try ACORN algorithm for complex filters: ACORN
  • Avoid using nested filtering conditions as a primary filter. It might force qdrant to read raw payload values instead of using index.
  • If payload index was added after HNSW build, trigger re-index to create filterable subgraph links

Optimize search performance with parallel updates

Diagnostic steps

  • Try to run the same query with indexed_only=true parameter, if the query is significantly faster, it means that the optimizer is still running and has not yet indexed all segments.
  • If CPU or IO usage is high even with no queries, it also indicates that the optimizer is still running.

Recommended configuration changes

  • reduce optimizer_cpu_budget to reserve more CPU for queries
  • Use prevent_unoptimized=true to prevent creating segments with a large amount of unindexed data for searches. Instead, once a segment reaches the so called indexing_threshold, all additional points will be added in ‘deferred state’.

Learn more here

What NOT to Do

  • Set always_ram=false on quantization (disk thrashing on every search)
  • Put HNSW on disk for latency-sensitive production (only for cold storage)
  • Increase segment count for throughput (opposite: fewer = better)
  • Create payload indexes on every field (wastes memory)
  • Blame Qdrant before checking optimizer status

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 7 months ago
  • Performance
  • qdrant
  • search
  • optimization
  • latency
  • throughput
  • vector-database
  • indexing
  • quantization

README badge

README badge for github/awesome-copilot/search-speed-optimization

Diagnoses and resolves slow Qdrant vector search performance through targeted fixes for memory pressure, HNSW tuning, payload indexing, and optimizer contention. Covers latency optimization for individual queries, throughput scaling for high QPS workloads, and filtered search acceleration.

Generated from the current SKILL.md.

What are the most common causes of slow Qdrant search?
Memory pressure (working set exceeds available RAM), complex requests with high HNSW parameters or unindexed filters, competing background processes like the optimizer, and cluster issues such as network problems or hardware degradation.
How do I know if payload retrieval is slowing down my queries?
Run the same query with `with_payload: false` and `with_vectors: false`. If latency drops significantly, payload retrieval is the bottleneck.
What should I do if filtered search is much slower than unfiltered search?
Create a payload index on the filtered field. For primary filtering conditions, consider using `is_tenant=true` for a tenant index, or try the ACORN algorithm for complex filters.
How do I increase query throughput under load?
Reduce segment count (set `default_segment_number` to 2), use the batch search API instead of single queries, enable quantization to reduce CPU cost, and add replicas to distribute read load.
Does the optimizer running in the background affect search performance?
Yes. Try running queries with `indexed_only=true` to check if the optimizer is still indexing segments. If significantly faster, reduce `optimizer_cpu_budget` to reserve more CPU for queries.

Generated from the current SKILL.md. These answers refresh after source changes.