Starting Typesense is extremely slow
Does anyone else have this issue? When I start the Typesense container, it take around 10-20 minutes to start, and Immich doesn't load until it's completely loaded.
Log output when I start container:
I20230807 17:46:55.262866 1 typesense_server_utils.cpp:357] Starting Typesense 0.24.1
... then, much later:
Is this normal and expected?21 Replies
Here's the relevant portion of my
docker-compose.yml
file:
How many assets do you have on your instance?
And, just as a curiosity: If you remove the cpu limit, does it still take a long time to start?
good catch
/api/asset/statistics
:
Not much faster last time I tested, but I'll try again. The thing is, all the other services on this server slow to an absolute crawl if Typesense is left to its own devices and gobbles up my CPU for multiple minutes...That amount shouldn't cause problems, I think
I removed the CPU limit.
I20230807 18:30:44.004426 1 typesense_server_utils.cpp:357] Starting Typesense 0.24.1
I'll post when Typesense shows that it's readyI have around 27000 assets and it takes about 30 seconds to start up
I20230807 18:32:53.243768 539 raft_server.cpp:498] Finished loading collections from disk.
A bit over two minutes. Hm.How many CPU cores do you allocate for this VM?
its not a vm, just a really old machine lol
well then 2 mins is not too bad
š
Does this seem normal, even 20 mins after Typesense is started?

It seems like Typesense just never stops reading and writing, even though I'm not scanning anything or adding files to the library
Might not be normal, I haven't seen this on order system
usually typesense will need to indexing upon starting up
I wonder with the lower CPU spec, it takes a while to finish indexing
Maybe
In any case I've disable Typesense for now
My poor server can't handle 30 minutes of sustained IO like that
In case anyone is interested:
Might be worth asking the typesense folks about this
I tried using a new Docker volume for the Typesense data. Maybe that will help
I have a Celeron N5095 (15w tdp) and it takes about 2 mins with 60k+ assets. 100% CPU the entire time fyi
A new volume will require all you assets to be reindexed from postgres, so it makes sense for it to be busy. Subsequent restarts should be much faster.
if it's really old then its cpu may not support avx2 or related instruction sets. building the hnsw index for vectors is cpu-intensive, so this will take longer if it can't accelerate it.
as far as i can tell, the N5095 also does not support avx2.