
Description
Guides Qdrant query latency optimization. Use when someone asks 'search is slow', 'how to reduce latency', 'p99 is too high', 'tail latency', 'single query too slow', 'how to make search faster', or 'latency spikes'.
SKILL.md
Scaling for Query Latency
Latency of a single query is determined by the slowest component in the query execution path. It is sometimes correlated with throughput, but not always — throughput and latency are opposite tuning directions.
Low latency optimization is aimed at utilising maximum resource saturation for a single query, while throughput optimization is aimed at minimizing per-query resource usage to allow more parallel queries.
Performance Tuning for Lower Latency
- Increase segment count to match CPU cores (
default_segment_number: 16) Minimizing latency - Keep quantized vectors and HNSW in RAM (
always_ram=true) - Reduce
hnsw_efat query time (trade recall for speed) Search params - Use local NVMe, avoid network-attached storage
Memory Pressure and Latency
RAM is the most critical resource for latency. If working set exceeds available RAM, OS cache eviction causes severe, sustained latency degradation.
- Vertical scale RAM first. Critical if working set >80%.
- Use quantization: scalar (4x reduction) or binary (16x reduction) Quantization
- Move payload indexes to disk if filtering is infrequent On-disk payload index
- Set
optimizer_cpu_budgetto limit background optimization CPUs - Schedule indexing: set high
indexing_thresholdduring peak hours
Vertical Scaling for Latency
More RAM and faster CPU directly reduce latency. See Vertical Scaling for node sizing guidelines.
What NOT to Do
- Do not expect to optimize latency and throughput simultaneously on the same node
- Do not use few large segments for latency-sensitive workloads (each segment takes longer to search)
- Do not run at >90% RAM (cache eviction causes severe latency degradation that can last days)
- Do not ignore optimizer status during performance debugging
- Do not scale down RAM without load testing (cache eviction causes days-long latency incidents)
More skills from the awesome-copilot repository
View all 15 skillsqdrant-horizontal-scaling
guide Qdrant horizontal scaling decisions
Apr 18AI InfrastructureArchitectureCapacity PlanningDatabase +1qdrant-indexing-performance-optimization
optimize Qdrant indexing performance
Apr 18Data EngineeringDatabaseETLPerformance +1qdrant-memory-usage-optimization
optimize Qdrant memory usage
Apr 18Cost OptimizationDatabaseObservabilityPerformance +1qdrant-monitoring-debugging
debug Qdrant production issues with metrics
Apr 18DebuggingMonitoringObservabilityPerformance +1qdrant-monitoring-setup
set up Qdrant monitoring and alerting
Apr 18AI InfrastructureMonitoringObservabilityQdrant +1qdrant-scaling-data-volume
scale Qdrant data volume
Apr 18AI InfrastructureArchitectureCapacity PlanningDatabase +1
More from GitHub
View publisherqdrant-scaling-qps
scale Qdrant query throughput
awesome-copilot
Apr 18AI InfrastructureArchitectureDatabasePerformance +1qdrant-scaling-query-volume
scale Qdrant query volume and pagination
awesome-copilot
Apr 18ArchitectureDatabasePerformanceQdrant +1qdrant-search-quality-diagnosis
diagnose Qdrant search quality issues
awesome-copilot
Apr 18AnalyticsData QualityDebuggingQdrant +1qdrant-search-speed-optimization
optimize Qdrant search speed
awesome-copilot
Apr 18AnalyticsDatabasePerformanceQdrant +1qdrant-search-strategies
select optimal Qdrant search strategies
awesome-copilot
Apr 18AI InfrastructureAnalyticsArchitectureQdrant +1