SurfSense/surfsense_backend/app/config
Claude 7f1476799c
Optimize RAM usage with lazy loading and memory limits
Major RAM savings (1.5-3GB reduction at startup):
- Implement lazy loading for embedding model, chunker, and reranker
- Models now load on first use instead of at startup
- Reduce embedding batch_size from 128 to 32 (saves 100-200MB spikes)

Celery memory optimizations:
- Reduce result_expires from 24h to 1h (saves Redis RAM)
- Reduce worker_max_tasks_per_child from 1000 to 100
- Add worker_max_memory_per_child=256MB limit to prevent leaks

Before: ~2-4GB RAM at startup
After: ~500MB-1GB at startup, models load on demand
2025-11-18 23:13:29 +00:00
..
__init__.py Optimize RAM usage with lazy loading and memory limits 2025-11-18 23:13:29 +00:00
global_llm_config.example.yaml Remove Google Analytics and Anthropic Claude from default configs 2025-11-17 21:42:57 +02:00
global_llm_config.yaml.template feat: Implement local-first European AI architecture with Mistral NeMo and TildeOpen 2025-11-17 19:58:20 +02:00
uvicorn.py Fixed all ruff lint and formatting errors 2025-07-24 14:43:48 -07:00