Qdrant Indexing Performance Optimization

作者 qdrant6a03d0ce8f55無授權條款收錄於 2026年10月8日更新於 2026年10月8日

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.

AI 產生的概覽

診斷並修復 Qdrant 索引與資料寫入過慢、最佳化器卡住及 HNSW 建置耗時過長的問題。

功能
此技能為 Qdrant 索引與資料寫入過慢提供排查指引。它協助判斷瓶頸在用戶端(批次處理、平行度)或伺服器端(CPU、磁碟 I/O、分片),並建議相應的組態調整,例如批次 upsert、增加分片、在 HNSW 建置前建立 payload 索引,以及大量匯入期間暫時提高 indexing_threshold_kb。它也涵蓋最佳化器卡住、HNSW 參數調校、多租戶 payload_m 索引,以及為高成本 payload 索引關閉額外 HNSW 連結。
適用情境
適用於上傳或 upsert 過慢、索引耗時過長、最佳化器看似卡住或發生錯誤、HNSW 建置時間佔比過高,或資料已上傳但搜尋品質不佳的情況。也適用於索引門檻相關問題以及分片無法合併的情形。
執行需求
不需要指令碼或特殊工具,僅為操作說明。使用前提是能存取 Qdrant 部署及其日誌、指標與組態,並會參考外部 Qdrant 文件頁面。

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.

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_kb very high, restore after) Collection params
  • Setting m=0 to disable HNSW is legacy, use high indexing_threshold_kb instead

Careful, fast unindexed upload might temporarily use more RAM and degrade search performance until optimizer catches up.

See https://skills.qdrant.tech/md/documentation/manage-data/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_status shows an error, check logs for disk full or corrupted segments

HNSW Build Time Too High

Use when: HNSW index build dominates total indexing time.

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=0 for 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)

來源與署名

來源:qdrant/skills位於skills/qdrant-performance-optimization/indexing-performance-optimization提交6a03d0c

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架