SQLite vs PostgreSQL (LLM Mock Stress Comparison)
This page summarizes the LLM mock stress test comparison for EchoCenter.
The stress tooling itself is maintained in branch:
chore/mock-llm-loadtest
Run command:
bash
git checkout chore/mock-llm-loadtest
make stress-llmTest Profile
STRESS_REQUESTS=1000STRESS_CONCURRENCY=20STRESS_TIMEOUT=20sMOCK_MODELLM delay:800ms
Summary
SQLite
throughput=24.31 req/sp50=811.6ms,p95=869.4ms,p99=876.7ms- Under concurrent writes, logs showed many
SQLITE_BUSYand persist-failure signals.
Local PostgreSQL
throughput=24.34 req/sp50=815.6ms,p95=858.2ms,p99=872.2ms- No corresponding DB lock/persist-failure signals in this run.
Conclusion
- In this mock setup, latency/throughput are both dominated by the 800ms LLM delay, so raw performance is close.
- Reliability under concurrent writes is better with PostgreSQL.
- Recommendation: prefer PostgreSQL for stress/production paths, use SQLite mainly for lightweight local development.