perf: ollama cpu-cap (2 cores) gegen ingest-spikes
Embedding-Inferenz ist CPU-only und skaliert sonst auf alle Cores. cpus: "2.0" + OLLAMA_NUM_PARALLEL=1 halten die Last konstant bei ~2 statt Peaks bis 8 Cores. Bewusster Trade-off: ~5x langsamere Bulk- Laufzeit, dafuer predictable Host-Last (selten laufender Workload). README dokumentiert, dass Coolify dieselben Limits spiegeln muss. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,15 @@ Image bauen und in Coolify neben Qdrant + Ollama deployen:
|
|||||||
docker build -f docker/Dockerfile -t rag-ingestor .
|
docker build -f docker/Dockerfile -t rag-ingestor .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Ollama-Ressourcenlimits
|
||||||
|
|
||||||
|
Embedding-Inferenz ist CPU-only und skaliert per Default auf alle verfügbaren Cores. Für Produktion daher Ollama hart limitieren, damit der Host nicht von Ingest-Spikes blockiert wird:
|
||||||
|
|
||||||
|
- `cpus: "2.0"` (Container-Cap)
|
||||||
|
- `OLLAMA_NUM_PARALLEL=1` (serialisiert Embedding-Requests intern)
|
||||||
|
|
||||||
|
Beide Werte sind in `docker-compose.yml` für die lokale Entwicklung gesetzt und sollten in Coolify entsprechend mitgepflegt werden. Folge: konstante ~2 CPU statt Peaks bis 8 CPU, dafür längere Bulk-Laufzeiten.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ services:
|
|||||||
- "11434:11434"
|
- "11434:11434"
|
||||||
volumes:
|
volumes:
|
||||||
- ollama_data:/root/.ollama
|
- ollama_data:/root/.ollama
|
||||||
|
# Cap CPU so embedding peaks don't starve the host. Mirror these
|
||||||
|
# limits in the production Coolify config — Ollama otherwise scales
|
||||||
|
# inference threads to all available cores.
|
||||||
|
cpus: "2.0"
|
||||||
|
environment:
|
||||||
|
OLLAMA_NUM_PARALLEL: "1"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
qdrant_data:
|
qdrant_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user