qdrant-indexing-performance-optimization
Skill này làm gì
Công cụ này giúp xác định và sửa các vấn đề khiến việc lập chỉ mục và nạp dữ liệu trong Qdrant rất chậm. Nó đề xuất điều chỉnh để tăng tốc tải dữ liệu lên và tìm kiếm.
Khi nào nên dùng
- ✓Khi tải dữ liệu lên Qdrant mất quá nhiều thời gian.
- ✓Khi quá trình tối ưu index bị treo hoặc mất quá nhiều thời gian.
- ✓Khi việc xây dựng index HNSW (một loại index để tìm kiếm nhanh) diễn ra rất chậm.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/qdrant-performance-optimization/indexing-performance-optimization/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Lập chỉ mục trong Qdrant của tôi rất chậm, tôi có thể làm gì?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích xem vấn đề nằm ở máy tính/mạng của bạn hay ở máy chủ Qdrant. Nó gợi ý tối ưu việc tải dữ liệu theo lô, điều chỉnh cấu hình Qdrant như số 'shards', và chiến lược lập chỉ mục để tăng tốc quá trình.
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.
What to Do When Qdrant Indexing Is Too Slow
Qdrant does NOT build HNSW indexes immediately. Small segments use brute-force until they exceed indexing_threshold_kb (default: 20 MB). Search during this window is slower by design, not a bug.
- Understand the indexing optimizer Indexing optimizer
Uploads/Ingestion Too Slow
Use when: upload or upsert API calls are slow. Identify bottleneck: client-side (network, batching) vs server-side (CPU, disk I/O)
For client-side, optimize batching and parallelism:
- Use batch upserts (64-256 points per request) Points API
- Use 2-4 parallel upload streams
For server-side, optimize Qdrant configuration and indexing strategy:
- Create more shards (3-12), each shard has an independent update worker Sharding
- Create payload indexes before HNSW builds (needed for filterable vector index) Payload index
Suitable for initial bulk load of large datasets:
- Disable HNSW during bulk load (set
indexing_threshold_kbvery high, restore after) Collection params - Setting
m=0to disable HNSW is legacy, use highindexing_threshold_kbinstead
Careful, fast unindexed upload might temporarily use more RAM and degrade search performance until optimizer catches up.
See https://search.qdrant.tech/md/documentation/tutorials-develop/bulk-upload/
Optimizer Stuck or Taking Too Long
Use when: optimizer running for hours, not finishing.
- Check actual progress via optimizations endpoint (v1.17+) Optimization monitoring
- Large merges and HNSW rebuilds legitimately take hours on big datasets
- Check CPU and disk I/O (HNSW is CPU-bound, merging is I/O-bound, HDD is not viable)
- If
optimizer_statusshows an error, check logs for disk full or corrupted segments
HNSW Build Time Too High
Use when: HNSW index build dominates total indexing time.
- Reduce
m(default 16, good for most cases, 32+ rarely needed) HNSW params - Reduce
ef_construct(100-200 sufficient) HNSW config - Keep
max_indexing_threadsproportional to CPU cores Configuration - Use GPU for indexing GPU indexing
HNSW index for multi-tenant collections
If you have a multi-tenant use case where all data is split by some payload field (e.g. tenant_id), you can avoid building a global HNSW index and instead rely on payload_m to build HNSW index only for subsets of data.
Skipping global HNSW index can significantly reduce indexing time.
See Multi-tenant collections for details.
Additional Payload Indexes Are Too Slow
Qdrant builds extra HNSW links for all payload indexes to ensure that quality of filtered vector search does not degrade.
Some payload indexes (e.g. text fields with long texts) can have a very high number of unique values per point, which can lead to long HNSW build time.
You can disable building extra HNSW links for specific payload index and instead rely on slightly slower query-time strategies like ACORN.
Read more about disabling extra HNSW links in documentation
Read more about ACORN in documentation
What NOT to Do
- Do not create payload indexes AFTER HNSW is built (breaks filterable vector index)
- Do not use
m=0for bulk uploads into an existing collection, it might drop the existing HNSW and cause long reindexing - Do not upload one point at a time (per-request overhead dominates)
Câu hỏi thường gặp
Vì sao tìm kiếm chậm hơn khi dữ liệu đang được lập chỉ mục?
Qdrant không xây dựng index HNSW ngay lập tức. Nó dùng một phương pháp đơn giản và nhanh hơn cho các khối dữ liệu nhỏ, nhưng phương pháp này chậm hơn khi tìm kiếm. Điều này thay đổi khi dữ liệu đạt một kích thước nhất định hoặc được tối ưu.
“Shards” là gì và chúng giúp ích thế nào?
“Shards” giống như các phần chia của dữ liệu. Có nhiều shard hơn cho phép Qdrant xử lý cập nhật và lập chỉ mục song song, làm tăng tốc quá trình tổng thể.
Nên tạo index 'payload' trước hay sau HNSW?
Nên tạo index 'payload' (thông tin bổ sung gắn với dữ liệu của bạn) trước khi xây dựng index HNSW. Điều này đảm bảo tìm kiếm có bộ lọc hoạt động đúng và có thể tối ưu tổng thời gian lập chỉ mục.
Chi tiết
Mô tả gốc của tác giả
Diagnoses and fixes slow Qdrant indexing and data ingestion. Use when someone reports 'uploads are slow', 'indexing takes forever', 'optimizer is stuck', 'HNSW build time too long', or 'data uploaded but search is bad'. Also use when optimizer status shows errors, segments won't merge, or indexing threshold questions arise.
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7360
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.