qdrant-minimize-latency
它能做什么
这个工具可以帮你加快 Qdrant 中的数据搜索。它会给出调整建议,让响应更快,但代价可能是同时能执行的搜索变少。
适用场景
- ✓当查找信息耗时太长时。
- ✓如果你发现最慢的那部分响应(P99 延迟)太高时。
- ✓当单次搜索的耗时比预期更长时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/minimize-latency/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 Qdrant 搜索很慢,怎样才能加快?”
每周 5 个新技能,1 分钟读完。
工作原理
工具会建议增加分段(segment)的数量,以便更好地利用处理器;将重要数据保留在内存(RAM)中;并降低搜索的复杂度。它还会提醒你,内存占用过多反而会让速度变慢。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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 - Keep quantized vectors and HNSW in RAM (
always_ram=true) - Reduce
hnsw_efat query time (trade recall for speed) Search params - 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 (16x reduction) Quantization
- Move payload indexes to disk if filtering is infrequent On-disk payload index
- Set
optimizer_cpu_budgetto limit background optimization CPUs - Schedule indexing: set high
indexing_thresholdduring peak hours
Vertical Scaling for Latency
More RAM and faster CPU directly reduce latency. See Vertical Scaling 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)
常见问题
什么是延迟?
延迟是指一次搜索完成所需的时间。延迟低意味着响应很快。
为什么内存(RAM)很重要?
把最常用的数据保存在内存中,系统就能更快地访问它们,从而缩短响应时间。
能否同时提高搜索速度和搜索数量?
一般来说不能。优化单次搜索的速度(低延迟)需要为每次搜索占用更多资源,这会限制可以并行运行的搜索数量。优化搜索数量(高吞吐量)则侧重于让每次搜索占用更少的资源。
详情
作者的原始描述
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'.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7364
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。