Index of every page on this site: llms.txt
All skills
github avatar

/minimize-latency

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

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'.

  • 1 file
  • 2.5 KB
  • Updated 7 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/github/awesome-copilot/minimize-latency

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈59 tokens for metadata: the name and description. ≈576 when used: this file.

Description uses 3.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈242 characters, or 3.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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)

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 7 months ago
  • qdrant
  • vector-search
  • latency
  • performance-tuning
  • ram
  • quantization
  • hnsw
  • indexing
  • scaling

README badge

README badge for github/awesome-copilot/minimize-latency

Optimizes Qdrant vector search latency by tuning segment count, memory allocation, and query parameters. Covers RAM scaling, quantization strategies, and hardware considerations to reduce p99 query times and prevent cache eviction degradation.

Generated from the current SKILL.md.

Does this skill apply to Qdrant only?
Yes. The skill is specific to Qdrant vector database query latency tuning and does not cover other search or database systems.
What's the difference between optimizing for latency versus throughput in Qdrant?
Latency optimization maximizes resource saturation for a single query (e.g. more segments, higher RAM usage), while throughput optimization minimizes per-query resources to allow parallel queries. These are opposite tuning directions and cannot be optimized simultaneously on the same node.
What happens if RAM usage exceeds available memory?
OS cache eviction causes severe, sustained latency degradation that can persist for days. The skill recommends vertical scaling RAM first and staying below 90% utilization.
Can quantization help with latency?
Yes. Scalar quantization reduces vector size by 4x and binary by 16x, lowering RAM pressure and allowing larger working sets to stay in memory.
Should I use fewer large segments or many small segments for low latency?
Use many small segments (matching CPU core count) for low latency. Fewer large segments take longer to search per query.

Generated from the current SKILL.md. These answers refresh after source changes.