#community-help

Addressing CPU Utilization Spikes in Typesense Cluster

TLDR Jainil approached for causes and solutions to CPU spikes. Jason clarified and suggested sending 1k-5K records per import API call to mitigate issue.

Powered by Struct AI

1

10
2mo
Solved
Join the chat
Sep 07, 2023 (2 months ago)
Jainil
Photo of md5-bea1e4531665b4608c47d00462429d3a
Jainil
06:01 PM
Is there any way to get insight as to what is causing the CPU utilization spikes in our typesense cluster?
06:02
Jainil
06:02 PM
Seems like there's occasional spikes, trying to figure out whats causing it, and best way to mitigate
Image 1 for Seems like there's occasional spikes, trying to figure out whats causing it, and best way to mitigate
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:03 PM
If it's indexing that's causing CPU spikes, you'll see corresponding increases in network traffic and may be pending write batches.

If it's search traffic that's causing CPU spikes, you'll see increases in searches per second and/or search latency
06:05
Jason
06:05 PM
If that's your production cluster last 24 hr view, then it's write traffic that's causing the CPU spikes
Jainil
Photo of md5-bea1e4531665b4608c47d00462429d3a
Jainil
06:06 PM
Makes sense! Thank you
06:07
Jainil
06:07 PM
Would increasing the number of records/api request help mitigate? Or I believe I read somewhere that typesense internally batches records by 40 records. We currently send ~40 records/api request
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:07 PM
Yeah, I'd recommend sending say 1k-5K records per import API call
Jainil
Photo of md5-bea1e4531665b4608c47d00462429d3a
Jainil
06:07 PM
Got my answer
06:07
Jainil
06:07 PM
Thanks!

1

Typesense

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

Indexed 3011 threads (79% resolved)

Join Our Community