/minimize-latency
Guides Qdrant query latency optimization. Use when someone asks 'search is slow', 'how to reduce latency', 'p99 is too high', 'tail latency', 'single query too slow', 'how to make search faster', or 'latency spikes'.
Claude Code
$ npx -y skills add qdrant/skills --skill minimize-latency --agent claude-code
Codex
$ npx skills add qdrant/skills --skill minimize-latency -a codex -y
Cursor
$ npx skills add qdrant/skills --skill minimize-latency -a cursor -y
Gemini CLI
$ npx skills add qdrant/skills --skill minimize-latency -a gemini-cli -y
GitHub Copilot
$ npx skills add qdrant/skills --skill minimize-latency -a github-copilot -y
OpenCode
$ npx skills add qdrant/skills --skill minimize-latency -a opencode -y
Windsurf
$ npx skills add qdrant/skills --skill minimize-latency -a windsurf -y
SKILL.md
minimize-latency.SKILL.mdname: qdrant-minimize-latency
description: "Guides Qdrant query latency optimization. Use when someone asks 'search is slow', 'how to reduce latency', 'p99 is too high', 'tail latency', 'single query too slow', 'how to make search faster', or 'latency spikes'."
Scaling for Query Latency
Latency of a single query is determined by the slowest component in the query execution path. It is sometimes correlated with throughput, but not always — throughput and latency are opposite tuning directions.
Low latency optimization is aimed at utilising maximum resource saturation for a single query, while throughput optimization is aimed at minimizing per-query resource usage to allow more parallel queries.
Performance Tuning for Lower Latency
- Increase segment count to match CPU cores (`default_segment_number: 16`) [Minimizing latency](https://skills.qdrant.tech/md/documentation/ops-optimization/optimize/?s=minimizing-latency)
- Keep quantized vectors and HNSW in RAM: `memory: pinned` on Qdrant 1.19 or newer; on 1.18 or older, `always_ram: true` for quantized vectors and `hnsw_config.on_disk: false` for HNSW [Memory tiers](https://skills.qdrant.tech/md/documentation/ops-configuration/memory-tiers/?s=legacy-settings)
- Reduce `hnsw_ef` at query time (trade recall for speed) [Search params](https://skills.qdrant.tech/md/documentation/ops-optimization/optimize/?s=fine-tuning-search-parameters)
- Use local NVMe, avoid network-attached storage
Memory Pressure and Latency
RAM is the most critical resource for latency. If working set exceeds available RAM, OS cache eviction causes severe, sustained latency degradation.
- Vertical scale RAM first. Critical if working set >80%.
- Use quantization: scalar (4x reduction) or binary (up to 32x reduction) [Quantization](https://skills.qdrant.tech/md/documentation/manage-data/quantization/)
- Move payload indexes to disk if filtering is infrequent: `memory: cold` on Qdrant 1.19 or newer, `on_disk: true` on 1.18 or older [On-disk payload index](https://skills.qdrant.tech/md/documentation/manage-data/indexing/?s=on-disk-payload-index)
- Set `optimizer_cpu_budget` to limit background optimization CPUs
- Schedule indexing: set high `indexing_threshold` during peak hours
Vertical Scaling for Latency
More RAM and faster CPU directly reduce latency. See [Vertical Scaling](../scaling-data-volume/vertical-scaling/SKILL.md) for node sizing guidelines.
What NOT to Do
- Do not expect to optimize latency and throughput simultaneously on the same node
- Do not use few large segments for latency-sensitive workloads (each segment takes longer to search)
- Do not run at >90% RAM (cache eviction causes severe latency degradation that can last days)
- Do not ignore optimizer status during performance debugging
- Do not scale down RAM without load testing (cache eviction causes days-long latency incidents)
Read more
name: qdrant-minimize-latency description: "Guides Qdrant query latency optimization. Use when someone asks 'search is slow', 'how to reduce latency', 'p99 is too high', 'tail latency', 'single query too slow', 'how to make search faster', or 'latency spikes'."
Scaling for Query Latency
Latency of a single query is determined by the slowest component in the query execution path. It is sometimes correlated with throughput, but not always — throughput and latency are opposite tuning directions.
Low latency optimization is aimed at utilising maximum resource saturation for a single query, while throughput optimization is aimed at minimizing per-query resource usage to allow more parallel queries.
Performance Tuning for Lower Latency
- Increase segment count to match CPU cores (`default_segment_number: 16`) [Minimizing latency](https://skills.qdrant.tech/md/documentation/ops-optimization/optimize/?s=minimizing-latency)
- Keep quantized vectors and HNSW in RAM: `memory: pinned` on Qdrant 1.19 or newer; on 1.18 or older, `always_ram: true` for quantized vectors and `hnsw_config.on_disk: false` for HNSW [Memory tiers](https://skills.qdrant.tech/md/documentation/ops-configuration/memory-tiers/?s=legacy-settings)
- Reduce `hnsw_ef` at query time (trade recall for speed) [Search params](https://skills.qdrant.tech/md/documentation/ops-optimization/optimize/?s=fine-tuning-search-parameters)
- Use local NVMe, avoid network-attached storage
Memory Pressure and Latency
RAM is the most critical resource for latency. If working set exceeds available RAM, OS cache eviction causes severe, sustained latency degradation.
- Vertical scale RAM first. Critical if working set >80%.
- Use quantization: scalar (4x reduction) or binary (up to 32x reduction) [Quantization](https://skills.qdrant.tech/md/documentation/manage-data/quantization/)
- Move payload indexes to disk if filtering is infrequent: `memory: cold` on Qdrant 1.19 or newer, `on_disk: true` on 1.18 or older [On-disk payload index](https://skills.qdrant.tech/md/documentation/manage-data/indexing/?s=on-disk-payload-index)
- Set `optimizer_cpu_budget` to limit background optimization CPUs
- Schedule indexing: set high `indexing_threshold` during peak hours
Vertical Scaling for Latency
More RAM and faster CPU directly reduce latency. See [Vertical Scaling](../scaling-data-volume/vertical-scaling/SKILL.md) for node sizing guidelines.
What NOT to Do
- Do not expect to optimize latency and throughput simultaneously on the same node
- Do not use few large segments for latency-sensitive workloads (each segment takes longer to search)
- Do not run at >90% RAM (cache eviction causes severe latency degradation that can last days)
- Do not ignore optimizer status during performance debugging
- Do not scale down RAM without load testing (cache eviction causes days-long latency incidents)
Agent skills for building with Qdrant vector search Skills encode deep Qdrant knowledge so coding agents can make the engineering decisions that determine whether vector search works well: quantization, sharding, tenant isolation, hybrid search, model
Other skills on qdrant.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about minimize-latency.
- Which coding agents can use minimize-latency?
- minimize-latency installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

