Skip to content

Performance and scaling issues

Performance problems in Alquimia Platform usually show up as slow responses, growing queues, or high resource utilization. Because the platform separates request intake from execution, you can isolate the bottleneck quickly.

SymptomLikely cause
Slow first responseWorker lag is high or LLM calls are slow.
TimeoutsTool calls or LLM calls exceed configured limits.
High CPU on workersInference loop is tight or many agents run concurrently.
High memory useLarge context windows or many sessions in Redis.
Database pressureWorklog write rate exceeds PostgreSQL capacity.
  1. Check Kafka consumer lag to see if events are backing up.

  2. Review worker resource metrics — CPU, memory, and goroutine or thread counts.

  3. Look at LLM latency metrics to identify whether the model provider is the bottleneck.

  4. Check Redis for lock contention, connection pool exhaustion, or memory growth.

  5. Check PostgreSQL for slow queries, connection pool saturation, or write throughput.

  6. Correlate with the worklog to find tasks with many tool calls or large context sizes.

  • Add worker replicas when lag is growing.
  • Reduce tool and LLM timeouts if they are too generous.
  • Tune memory strategies to keep context windows bounded.
  • Scale Redis and PostgreSQL independently if they are saturated.
  • Move to faster LLM models or add caching for common queries.