#community-help

Understanding Memory Usage in Relation to Search Requests

TLDR Andrew noticed memory spikes conducting searches. Jason advised it's due to data indexing. Kishore Nallan added that large results require working memory, causing temporary spikes.

Powered by Struct AI

1

5
11mo
Solved
Join the chat
Nov 23, 2022 (11 months ago)
Andrew
Photo of md5-7766f890de99fa72a6d81315691a6758
Andrew
08:37 PM
What impacts spikes in memory usage? I created a function that makes four separate search requests at once, and after running this function a few times im noticing a spike in memory usage. Does memory usage spike based on the number of results returned, or based on the amount of search requests performed?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:38 PM
Memory usage is primarily impacted by the amount of data indexed. Searches might temporarily use memory, but it should be tiny comparatively.
Andrew
Photo of md5-7766f890de99fa72a6d81315691a6758
Andrew
08:40 PM
I see, so running 100 search requests that each return 1 result would be less impactful than 1 search request of 1000 results?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:42 PM
I’ll defer to Kishore Nallan on that question ^

1

Nov 24, 2022 (11 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:40 AM
Query processing requires some working memory when large number of results match a given query. However the spike is temporary and memory will go back to baseline after the search is done.

As for the second question, difficult to say because there are a few fixed per search overhead.