Summary
The embedding container holds high RSS while idle. Appwrite self-hosted starts appwrite/embedding with EMBEDDING_MODELS=nomic-embed-text and does not set EMBEDDING_POOL_SIZE, so the process defaults to available_parallelism() copies of full-precision Nomic.
This issue tracks measuring idle RSS and cutting it without changing embedding quality (stay on NomicEmbedTextV15).
Constraints
- Keep
POST /embed request/response shape
- Keep full-precision nomic (
NomicEmbedTextV15, 768-d)
- No quantized / smaller-model default
Planned levers
- Default
EMBEDDING_POOL_SIZE to 1 (not CPU count)
- Lazy-load models so
/health does not pin weights
- Idle-unload after
EMBEDDING_IDLE_UNLOAD_SECS (reload same checkpoint from disk)
- Cap ORT intra-op threads
- jemalloc so dropped sessions return RSS to the OS
- Cache nomic only in the image (not
nomic,bge-small)
Measurements
Baseline vs each lever will be posted as comments.
Summary
The embedding container holds high RSS while idle. Appwrite self-hosted starts
appwrite/embeddingwithEMBEDDING_MODELS=nomic-embed-textand does not setEMBEDDING_POOL_SIZE, so the process defaults toavailable_parallelism()copies of full-precision Nomic.This issue tracks measuring idle RSS and cutting it without changing embedding quality (stay on
NomicEmbedTextV15).Constraints
POST /embedrequest/response shapeNomicEmbedTextV15, 768-d)Planned levers
EMBEDDING_POOL_SIZEto 1 (not CPU count)/healthdoes not pin weightsEMBEDDING_IDLE_UNLOAD_SECS(reload same checkpoint from disk)nomic,bge-small)Measurements
Baseline vs each lever will be posted as comments.