Skip to main content

Performance

The knobs that actually move Shaktiman's latency, throughput, memory, and disk usage — what each costs, how to measure its effect, and how to pick a setting.

Representative numbers

The ranges on these pages come from measured behaviour during development, not a reproducible benchmark harness. Treat them as orders-of-magnitude guidance. A dedicated benchmark corpus is a planned follow-up; if you have a well-defined repo + workload you'd like to contribute measurements from, open an issue.

The four axes

Every knob on these pages trades between one or more of:

AxisWhat it means
LatencyHow long a single query takes (p50, p95). User-facing.
ThroughputHow many queries / index operations you can do per second. Matters during cold index and under heavy agent use.
MemoryResident memory of shaktimand plus connection overhead.
Disk.shaktiman/ footprint on local storage.
Index build timeHow long cold / incremental index takes.

When to tune

For small to mid-sized repos (under ~1 M lines), defaults are fine. Tune only if you hit a specific problem:

ProblemStart here
Queries feel slowQuery performance
Cold index takes foreverIndexing performance
shaktimand is using more memory than you can spareBackend selection
Disk footprint is surprisingBackend selection
Many developers sharing infrastructureScaling

How to measure

Three commands cover 90% of observational needs:

# Is the index healthy? How big?
shaktiman status --root .

# Is embedding caught up?
shaktiman enrichment-status --root .

# Time a representative query
time shaktiman search "your typical query" --root .

For per-query score breakdowns (useful when tuning min_score), add --explain --format text to search.

For deeper profiling, Shaktiman's structured log (.shaktiman/shaktimand.log, JSON per line) records the duration of each major phase — pipe through jq to inspect.

Not covered here

  • LLM-side latency. Shaktiman affects prompt size (by virtue of budget-fitted context), but model inference time is out of scope.
  • Claude Code / Cursor / Zed overhead. Tiny and client-specific.
  • Network-bound backends. If you're using Qdrant Cloud or remote Postgres, your latency floor is network RTT, not Shaktiman.

See also