Chuyển đến nội dung
Skillpedia
Cơ sở dữ liệu40k · #7370

qdrant-scaling-qps

Skill này làm gì

Hướng dẫn này giúp tăng số lượt tìm kiếm mà Qdrant xử lý được mỗi giây. Nó tập trung tối ưu hệ thống để xử lý nhiều yêu cầu cùng lúc, khác với việc làm từng lượt tìm kiếm nhanh hơn.

Khi nào nên dùng

  • ✓Khi bạn cần hệ thống phản hồi nhiều lượt tìm kiếm cùng lúc.
  • ✓Khi tìm kiếm chậm vì có nhiều người dùng hệ thống cùng lúc.
  • ✓Khi cấu hình Qdrant để xử lý khối lượng yêu cầu lớn.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-qps/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-qps/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để Qdrant xử lý được nhiều truy vấn hơn mỗi giây?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Để tăng số truy vấn mỗi giây, bạn có thể điều chỉnh cài đặt để Qdrant dùng ít tài nguyên hơn cho mỗi lượt tìm kiếm, chẳng hạn gom nhóm các lượt tìm kiếm hoặc dùng ít phần dữ liệu (shard) hơn cùng lúc. Nếu vẫn chưa đủ, bạn có thể thêm máy để chia sẻ khối lượng công việc.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Minimize impact of Update Workloads

  • Configure update throughput control (v1.17+) to prevent unoptimized searches degrading reads Low latency search
  • Set optimizer_cpu_budget to limit indexing CPUs (e.g. 2 on 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_uring on 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)
Câu hỏi thường gặp

Sự khác nhau giữa tốc độ phản hồi một lượt tìm kiếm (latency) và số truy vấn mỗi giây (throughput) là gì?

Latency là thời gian để một lượt tìm kiếm được trả lời. Throughput là số lượt tìm kiếm hệ thống trả lời được trong một giây. Tối ưu cái này có thể làm cái kia tệ đi.

“Segment” là gì và vì sao ít segment hơn lại tốt hơn cho số truy vấn mỗi giây cao hơn?

Segment giống như các tệp nơi dữ liệu được sắp xếp. Có ít segment hơn, lớn hơn nghĩa là Qdrant cần truy cập ít tệp hơn cho mỗi lượt tìm kiếm, hiệu quả hơn khi mục tiêu là trả lời nhiều lượt tìm kiếm thật nhanh.

“Tăng quy mô theo chiều ngang” (horizontal scaling) là gì?

Nghĩa là thêm nhiều máy (hoặc nhiều instance Qdrant) để chia nhỏ công việc. Cách này hữu ích khi một máy không còn xử lý nổi mọi yêu cầu, kể cả sau khi đã tối ưu.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7370
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự