qdrant-search-speed-optimization
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 growt
- 01GitHub stars
- 267
- 02Installs
- New
- 03Files scanned
- 1
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 f6183950d3d5592d… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Diagnose a problem
There are 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:
- Read the slow request log (v1.16+, always on, per node) to find the slowest unique operations over 50 ms Slow request log
- Check if second run of the same request is significantly faster (indicates memory pressure)
- Try the same query with
with_payload: falseandwith_vectors: falseto 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:
- Tune HNSW parameters: Fine-tuning search
- Enable in-memory quantization: Scalar quantization
- On v1.19+, store vectors as
datatype: turbo4(4-bit, about 8x smaller) to cut disk reads. Lossy: the originals are no longer full precision, so check recall. Set it when creating the collection or adding a new named vector, so existing data must be re-ingested turbo4 - Reduce Vector Dimensionality with Matryoshka Models: Matryoshka Models
- Use oversampling + rescore for high-dimensional vectors Search with quantization
- Enable async I/O (
io_uring) for disk-heavy workloads on Linux:storage.performance.io_uring: autoon Qdrant 1.19 or newer,async_scorer: trueon 1.18 or older. Managed Qdrant Cloud enables it automatically from 1.20, so there is nothing to set there Async I/O
Can't Handle Enough QPS (Throughput)
Use when: system can't serve enough queries per second under load.
- Reduce segment count (
default_segment_numberto 2) Maximizing throughput - Use batch search API instead of single queries Batch search
- Enable quantization to reduce CPU cost Scalar quantization
- Add replicas to distribute read load Replication
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=truefor primary filtering condition: Tenant index - Try ACORN algorithm for complex filters: ACORN
nestedfilter conditions check each remaining candidate's payload element by element, which is slow when many candidates remain. On Qdrant 1.20 or newer, create per-element indexes (thenestedparameter of the payload index) on every field the nested filter uses, so Qdrant answers it from the indexes without reading payload Per-element index.- Substring match (
matchwithsubstring, 1.20+) is expensive: it checks every distinct value of the field, and Qdrant rejects it whenever strict mode is enabled (the Qdrant Cloud default). Prefer prefix match (keyword index withprefix: true) or full-text match where the use case allows. A keyword index, especially withprefix, speeds it up; a full-text index doesn't help Substring match - 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=trueparameter, 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_budgetto reserve more CPU for queries - As an alternative to
indexed_only, setprevent_unoptimized: true(v1.17.1+, experimental) to prevent searching over unindexed data. When it's on, setwait=falseon all write requests, or writes block until indexing catches up.
Learn more in the read-write contention guide
What NOT to Do
- Set quantization to not stay in RAM (disk thrashing on every search): avoid
memory: cold/cachedon Qdrant 1.19 or newer; on 1.18 or older, avoid leavingalways_ramfalse or unset while the original vectors areon_disk: true - 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
Files
1- SKILL.md
c1dcbef2d56.4 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from qdrant/skills8
Qdrant provides client SDKs for various programming languages, allowing easy integration with Qdrant deployments.
Guides running and managing Qdrant Managed Cloud clusters with the Qdrant Cloud MCP, the qcloud CLI, the Cloud API, and Terraform. Use when someone asks 'my Cloud cluster is unhealthy', 'check my Qdrant Cloud cluster', 'use the Cloud MCP', 'manage Qdrant Cloud from my agent', 'qcloud or Terraform',
Choosing and wiring up the interface for managing Qdrant Managed Cloud: Console, the Cloud MCP, the qcloud CLI, the Cloud API, Terraform, or Pulumi, plus authentication, management keys, and CI use. Use when someone says 'which Cloud interface should I use', 'qcloud or Terraform', 'automate cluster
Operating a running Qdrant Managed Cloud cluster: reading health, metrics, logs, and alerts, resizing, backups and restores, version updates, access audits, and which changes an agent may make unprompted. Use when someone says 'my Cloud cluster is unhealthy', 'cluster keeps restarting', 'check clust
Guides Qdrant deployment selection. Use when someone asks 'how to deploy Qdrant', 'Docker vs Cloud', 'local mode', 'embedded Qdrant', 'Qdrant EDGE', 'which deployment option', 'self-hosted vs cloud', or 'need lowest latency deployment'. Also use when choosing between deployment types for a new proje
Guides building on Qdrant Edge, the embedded in-process shard. Use when someone asks 'how to sync Edge with the server', 'keep a local shard in sync with Qdrant Cloud', 'BM25 or keyword search on Edge', 'hybrid search on Edge', 'embeddings on device', 'Edge snapshots', 'apply a partial snapshot', 'w
Diagnoses and guides Qdrant horizontal scaling decisions. Use when someone asks 'vertical or horizontal?', 'how many nodes?', 'how many shards?', 'how to add nodes', 'resharding', 'data doesn't fit', 'need more capacity', 'change replication factor', 'reduce replicas', or 'remove extra replicas'. Al
Setting up and running Qdrant Hybrid Cloud on your own Kubernetes cluster (managed, on-prem, or edge): prerequisites, storage/CSI and backups, installing the Qdrant Cloud agent and operator, creating/exposing/securing clusters, registry mirroring, and secret rotation. Use when someone wants to set u
Related tooling skillsscan passed
Web performance regression detection. Use for: web performance benchmark, check page speed. (gstack)
Use this skill to check or change this machine's NVIDIA display and GPU settings, such as resolution, refresh rate, V-Sync, G-SYNC, brightness, color, and GPU performance.
Onboarding entrypoint for agents-cli in Agent Platform. It should be used when the user wants to "create a new agent", "develop an agent", "build an agent using ADK", "run the agent locally", "debug agent code", "test an agent", "evaluate an agent", "deploy an agent", "publish an agent", "monitor an
Use when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style hierarchy, overrides, caching).
Find the mistakes agents keep repeating in this repo and make each impossible at the highest enforcing level — lint rule, type guard, runtime check, script, then text — with every enforcement proven to fire.
Stop. That last message did not land: re-pitch it.