Can many indexes share one instance of StandardGpuResources? #1572
-
Question about GPU. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hmmm normally it should be fine to have a |
Beta Was this translation helpful? Give feedback.
-
The constraint is one StandardGpuResources object per CPU thread. You can use a StandardGpuResources object for multiple indices on the same or multiple GPUs but the constraint is that you cannot run them concurrently from different CPU threads; only a single index + single GPU can be run at one time on a single thread if they share a StandardGpuResources object. IndexShards and IndexReplicas use multiple threads, so if they are used with GPU indices they require a StandardGpuResources object for each thread / index. |
Beta Was this translation helpful? Give feedback.
-
I use docker and only one gpu(2080TI), a resource for multiple indices on a GPU.
Yes,I have found that. I have 100 GPUIVFPQs, each index has 1 million vectors. The search can not be run on multiple threads. |
Beta Was this translation helpful? Give feedback.
-
Do you have multiple GPUs? Typically with the GPU indices, it only makes sense to go multithreaded CPU either if you have an index on separate GPUs, or if the index is too small or the queries are too small to fully utilize a single GPU. |
Beta Was this translation helpful? Give feedback.
-
@wickedfoo ,thanks a lot.
No,I just have a GPU to deal with 100 million vectors. The number of query is from 20 to 500.
How to measure small? Is it determined by GpuResources and GPU memory? Sounds like I don't need to run on multiple threads. I think some of your instructions should be added to user guideline. |
Beta Was this translation helpful? Give feedback.
The constraint is one StandardGpuResources object per CPU thread. You can use a StandardGpuResources object for multiple indices on the same or multiple GPUs but the constraint is that you cannot run them concurrently from different CPU threads; only a single index + single GPU can be run at one time on a single thread if they share a StandardGpuResources object.
IndexShards and IndexReplicas use multiple threads, so if they are used with GPU indices they require a StandardGpuResources object for each thread / index.