Closed fortunto2 closed 2 years ago
no idea, is it possible the index doesn't fit in memory? that can cause dramatic slowdown
I am seeing the same problem. It appears inside docker Annoy isn't able to access multiple cores even if the docker has access to them. I'm looking into how I can fix it.
Annoy doesn't use multiple cores (although you can use multiple threads yourself)
I think the slowdown is probably caused by swapping. Try running the get_nns_
call multiple times. Does it get faster and faster? It should.
I'll just add it works fine in Docker, assuming your index fits in memory. I've been running it in Docker for almost 2 years. My index consists of over 300 million items and searches are generally ~200ms. If my index exceeds available memory searers are 30+ seconds.
hi, my docker search_index.get_nns_by_vector work more >30sec without docker in notebook <1sec Why?
Google cloud 16gb ram, 4 core
1mln images - vector (512) 2.5gb search index size
docker-compose
dockerfile
docker info