qdrant-search-speed-optimization
它能做什么
这个工具可以帮你找出让 Qdrant 搜索变慢的问题,并加以修复。它会分析搜索耗时过长的原因,并给出调整建议,帮助你提升速度。
适用场景
- ✓当你的 Qdrant 数据库搜索耗时太长时。
- ✓如果查询(搜索请求)需要很长时间才能返回结果。
- ✓在修改配置或添加大量数据后,搜索明显变慢时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/qdrant-performance-optimization/search-speed-optimization/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 Qdrant 搜索非常慢,我该怎么办?”
每周 5 个新技能,1 分钟读完。
工作原理
工具会检查问题是否出在内存不足、查询过于复杂、后台进程仍在运行,或系统本身的问题。根据检查结果,它会给出具体的配置或调整建议,帮助提升速度。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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: 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
- Reduce Vector Dimensionality with Matryoshka Models: Matryoshka Models
- Use oversampling + rescore for high-dimensional vectors Search with quantization
- Enable io_uring for disk-heavy workloads on Linux io_uring
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
- Avoid using
nestedfiltering 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=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 - Use
prevent_unoptimized=trueto 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=falseon 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
常见问题
为什么我的搜索突然变慢了?
这可能有多种原因,比如系统内存不足、查询非常复杂,或者在添加大量数据后,优化进程仍在运行。
什么是“延迟”(latency)?它如何影响搜索?
延迟是指一次搜索完成所需的时间。延迟高意味着每次搜索都要花很长时间才能返回结果。
什么是 QPS?它为什么可能很低?
QPS 是 Queries Per Second(每秒查询数)的缩写。QPS 低说明系统在短时间内无法处理很多搜索,即使单次搜索本身不算慢。
详情
作者的原始描述
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.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7362
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。