Back to Skills

qdrant-minimize-latency

qdrant
Updated 5 days ago
154
18
154
View on GitHub
Designaidesign

About

This skill helps developers optimize Qdrant vector database query latency when facing slow searches or high tail latency. It provides guidance on configuration tuning like increasing segment count and keeping quantized vectors in RAM. Use it when developers ask about reducing latency, improving P99 times, or making searches faster.

Quick Install

Claude Code

Recommended
Primary
npx skills add qdrant/skills -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/qdrant/skills
Git CloneAlternative
git clone https://github.com/qdrant/skills.git ~/.claude/skills/qdrant-minimize-latency

Copy and paste this command in Claude Code to install this skill

Documentation

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_ef at 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_budget to limit background optimization CPUs
  • Schedule indexing: set high indexing_threshold during 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)

GitHub Repository

qdrant/skills
Path: skills/qdrant-scaling/minimize-latency
0
agent-skillsai-agentsclaude-codecodexcursorembeddings

Related Skills

executing-plans

Design

Use the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.

View skill

requesting-code-review

Design

This skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.

View skill

connect-mcp-server

Design

This skill provides a comprehensive guide for developers to connect MCP servers to Claude Code using HTTP, stdio, or SSE transports. It covers installation, configuration, authentication, and security for integrating external services like GitHub, Notion, and custom APIs. Use it when setting up MCP integrations, configuring external tools, or working with Claude's Model Context Protocol.

View skill

web-cli-teleport

Design

This skill helps developers choose between Claude Code Web and CLI interfaces based on task analysis, then enables seamless session teleportation between these environments. It optimizes workflow by managing session state and context when switching between web, CLI, or mobile. Use it for complex projects requiring different tools at various stages.

View skill