qdrant-scaling-qps
它能做什么
这份指南可以帮你提高 Qdrant 每秒能处理的搜索次数。重点在于优化系统,让它同时处理更多请求,这与让单次搜索变得更快不太一样。
适用场景
- ✓当你需要系统能同时响应更多搜索时。
- ✓如果因为很多人同时使用系统而导致搜索变慢。
- ✓当你要配置 Qdrant 来处理大量请求时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-qps/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何让 Qdrant 每秒处理更多查询?”
每周 5 个新技能,1 分钟读完。
工作原理
要提高每秒查询数,你可以调整设置,让 Qdrant 在每次搜索时占用更少的资源,比如合并批量搜索,或者同一时间查询更少的数据分片。如果这些还不够,你可以增加机器,让它们共同分担工作量。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Scaling for Query Throughput (QPS)
Throughput scaling means handling more parallel queries per second. This is different from latency - throughput and latency are opposite tuning directions and cannot be optimized simultaneously on the same node.
High throughput favors fewer, larger segments so each query touches less overhead.
Performance Tuning for Higher RPS
- Use fewer, larger segments (
default_segment_number: 2) Maximizing throughput - Enable quantization with
always_ram=trueto reduce disk IO Quantization - Use batch search API to amortize overhead Batch search
Minimize impact of Update Workloads
- Configure update throughput control (v1.17+) to prevent unoptimized searches degrading reads Low latency search
- Set
optimizer_cpu_budgetto limit indexing CPUs (e.g.2on an 8-CPU node reserves 6 for queries) - Configure delayed read fan-out (v1.17+) for tail latency Delayed fan-outs
Horizontal Scaling for Throughput
If a single node is saturated on CPU after applying the tuning above, scale horizontally with read replicas.
- Shard replicas serve queries from replicated shards, distributing read load across nodes
- Each replica adds independent query capacity without re-sharding
- Use
replication_factor: 2+and route reads to replicas Distributed deployment
See also Horizontal Scaling for general horizontal scaling guidance.
Disk I/O Bottlenecks
If it is not possible to keep all vectors in RAM, disk I/O can become the bottleneck for throughput. In this case:
- Upgrade to provisioned IOPS or local NVMe first. See impact of disk performance to vector search in Disk performance article
- Use
io_uringon Linux (kernel 5.11+) io_uring article - In case of quantized vectors, prefer global rescoring over per-segment rescoring to reduce disk reads. Example in the tutorial
- Configure higher number of search threads to parallelize disk reads. Default is
cpu_count - 1, which is optimal for RAM-based search but may be too low for disk-based search. See configuration reference - If still saturated, scale out horizontally (each node adds independent IOPS)
What NOT to Do
- Do not expect to optimize throughput and latency simultaneously on the same node
- Do not use many small segments for throughput workloads (increases per-query overhead)
- Do not scale horizontally when IOPS-bound without also upgrading disk tier
- Do not run at >90% RAM (OS cache eviction = severe performance degradation)
常见问题
搜索速度(延迟)和每秒查询数(吞吐量)有什么区别?
延迟是单次搜索得到响应所需的时间,吞吐量是系统每秒能响应多少次搜索。优化其中一个,有时会让另一个变差。
什么是“segment”?为什么 segment 越少,每秒查询数越高?
segment 就像存放数据的文件。segment 越少、体积越大,Qdrant 每次搜索需要访问的文件就越少。当目标是快速响应大量搜索时,这样效率更高。
什么是“横向扩展”?
横向扩展指增加机器(或 Qdrant 实例)来分担工作。当即使经过优化,单台机器也无法承受所有请求时,这种方式就很有用。
详情
作者的原始描述
Guides Qdrant query throughput (QPS) scaling. Use when someone asks 'how to increase QPS', 'need more throughput', 'queries per second too low', 'batch search', 'read replicas', or 'how to handle more concurrent queries'.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7370
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。