跳到正文
Skillpedia
数据库40k · #7364

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/minimize-latency/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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_ef at 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_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 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能