#community-help

Improving Write Performance in Database Clusters

TLDR Todd sought suggestions to enhance write performance and reduce CPU throttling. Jason recommended facilitating multiple writes into fewer API calls and described the impacts of various fields on indexing time. Todd saw significant improvements following this advice.

Powered by Struct AI

1

1

1

8
1mo
Solved
Join the chat
Oct 19, 2023 (1 month ago)
Todd
Photo of md5-cccf0b87668408fef09dd77e1948fced
Todd
05:28 PM
We tend to see a pretty strong relationship between pending write batches and CPU throttling. Would anyone have recommendations on like write rates to aim for on specific clusters for this stuff, or how they reduce the overhead of writes? Would removing faceting from fields get us significant reductions here, that sorta thing?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:57 PM
Batching multiple writes into a fewer API calls using the import endpoint would give you the most write performance gains
05:57
Jason
05:57 PM
I would recommend at least 1K writes per API call (and then increasing the client-side timeout)
05:58
Jason
05:58 PM
Besides that, indexing time is indeed proportional to the number of fields in the schema, whether faceting is enabled for a field, whether sorting is enabled for a string field, if characters specified in token_separators end up leading to a lot of words, etc
Todd
Photo of md5-cccf0b87668408fef09dd77e1948fced
Todd
06:47 PM
Jason - Thank you for this advice! Wow, we are typically doing one write per API call usually 😅

1

Oct 25, 2023 (1 month ago)
Todd
Photo of md5-cccf0b87668408fef09dd77e1948fced
Todd
04:56 PM
Jason - We have been doing some troubleshooting and picking up some low hanging fruit, and our write performance is already looking amazingly better. Thank you for all of your help and advice, and of course an amazing product!!!

1

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:51 PM
That's great to hear! Happy to help

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3011 threads (79% resolved)

Join Our Community

Similar Threads

Implementing Semantic Search with Typesense

Erik sought advice for semantic search implementation in Typesense and raised issues around slow document import and excessive latency. Upon implementing advice from Kishore Nallan to try different models, Erik reported faster times, ultimately deciding to rate-limit imports.

1

17
1mo
Solved

Clarification on Faceting and Grouping in Typesense

Carlo asked about faceting and grouping in Typesense. Kishore Nallan clarified their operation, suggesting they account for grouping while calculating on the whole set.

1

4
1mo
Solved

Issue with Query Expectations on Typesense Search

Sean was having an issue with their search query on Typesense. Kishore Nallan suggested adjusting the 'drop_tokens_threshold' parameter. After making the adjustment, Sean found an issue with the order of the results, which was resolved by updating Typesense version.

2

22
2mo
Solved

Updating Bulk Records and Resolving Typsense Issues.

Greg inquired about updating bulk records. Jason proposed using the documents/import endpoint for bulk updating, identified issues with Typesense, and provided solutions. Greg appreciated the assistance. Conversation related to the procedure was shared with Viktor.

8

63
13mo
Solved

Bulk Execution of 'Update by Query' in Typesense

Jacob inquired about executing `update by query` in bulk for specific conditions. Kishore Nallan provided information and Jason advised dealing with conditional updates in the primary datastore before syncing with Typesense.

6
1mo
Solved