Skip to content
Back to skills

Minimize Latency

ASecurity

Use when single-query Qdrant latency is too high and throughput is not the constraint. Covers segment count matched to CPU cores, keeping quantized vectors and HNSW in RAM, and trading recall for speed via hnsw_ef.

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 10, 2026
ai-agentsnodetestingdebugginggitperformancedocumentation

Security analysis

A100/100

Scanned October 10, 2026

npx -y skills add mouadja02/skills --skill minimize-latency --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Minimize Latency?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Minimize Latency
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mouadja02-minimize-latency/badge)](https://www.skillsdirectory.com/skills/mouadja02-minimize-latency)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: qdrant-minimize-latency
description: Use when single-query Qdrant latency is too high and throughput is not the constraint. Covers segment count matched to CPU cores, keeping quantized vectors and HNSW in RAM, and trading recall for speed via hnsw_ef.
version: "1.0.1"
source: "https://github.com/qdrant/skills"
attribution: "qdrant/skills by Qdrant"
---

> **Attribution:** Sourced from [qdrant/skills](https://github.com/qdrant/skills) by [Qdrant](https://qdrant.tech).

# 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](https://search.qdrant.tech/md/documentation/operations/optimize/?s=minimizing-latency)
- Keep quantized vectors and HNSW in RAM (`always_ram=true`)
- Reduce `hnsw_ef` at query time (trade recall for speed) [Search params](https://search.qdrant.tech/md/documentation/operations/optimize/?s=fine-tuning-search-parameters)
- 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](https://search.qdrant.tech/md/documentation/manage-data/quantization/)
- Move payload indexes to disk if filtering is infrequent [On-disk payload index](https://search.qdrant.tech/md/documentation/manage-data/indexing/?s=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](https://github.com/mouadja02/skills/tree/main/skills/llm-tooling/qdrant-scaling/scaling-data-volume/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)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…