How to Debug Slow Search Requests in Milvus

This post details how to debug slow search requests in Milvus by leveraging metrics (Service Quality → Slow Query, Search Latency, Query Node → Search Latency by Phase) and logs (marked with [Search slow]). It analyzes root causes including heavy workload (large NQ, high QPS), inefficient filtering (poorly conducted expressions, lack of scalar indexes, JSON filters, strict consistency), improper vector index choice (HNSW, IVF, DiskANN, MINHASH_LSH for binary vectors), and runtime/environment conditions (compaction, upserts, version-specific issues). It provides actionable fixes for each cause and outlines best practices for prevention, such as resource allocation, proactive alerts, efficient filters, batch upserts, and indexing all filter fields.
More from the Benchmarking and Performance Analysis trail
- Troubleshooting a Search Slowdown After Upgrading Milvus: Lessons from the WPS Team
- How to Safely Upgrade from Milvus 2.5.x to Milvus 2.6.x
- Hands-On with VDBBench: Benchmarking Vector Databases for POCs That Match Production
- https://zilliz.com/blog/vdbbench-1-0-benchmarking-with-your-real-world-production-workloads
- We Benchmarked 20+ Embedding APIs with Milvus: 7 Insights That Will Surprise You