#community-help

Upgrading Typesense Version and Addressing CPU Spikes

TLDR Laura asks about the new version of typesense and about CPU usage spike. Jason recommends upgrading to 0.25.2.rc1, suggests monitoring metrics to identify the cause of CPU spikes, and provides remedies for them. They also assist Laura in upgrading their cluster.

Powered by Struct AI

1

1

19
2mo
Solved
Join the chat
Sep 27, 2023 (2 months ago)
Laura
Photo of md5-e31442d4d6c849124582a10193fe7721
Laura
06:32 PM
Hi guys, do we have a new version of typesense? I went into my cluster and it says "Typesense v0.25.0 New version available", is it recommended that I upgrade?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:34 PM
Yeah, I'd recommend upgrading to 0.25.2.rc1, it has a few bug fixes from 0.25.0

1

Laura
Photo of md5-e31442d4d6c849124582a10193fe7721
Laura
06:35 PM
I also received this warning
06:35
Laura
06:35 PM
Image 1 for
06:36
Laura
06:36 PM
how can i tell if it was just searches in my cluster or document indexing that caused this cpu spike?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:37 PM
You'd want to correlate that spike with any equivalent spikes in Search latency / searches per second / network traffic to know if it's search or writes
06:38
Jason
06:38 PM
Looking at your metrics, it looks like it was due to a heavy search query
06:38
Jason
06:38 PM
Since it's a one-off spike, I wouldn't recommend a CPU upgrade
Laura
Photo of md5-e31442d4d6c849124582a10193fe7721
Laura
06:39 PM
i've seen the behavior of the week and it seems that these cpu peaks have happened frequently. what size cpu would be ideal for my case?
06:40
Laura
06:40 PM
Image 1 for
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:41 PM
Oh hmm ok yeah I just expanded the time period and I see this too...
06:42
Jason
06:42 PM
But this is max CPU usage, if you set it to p95 it should look much better
06:43
Jason
06:43 PM
In any case, ideally you'd want to have 4vCPUs. But to solve for this particular spiky pattern, you might want to first try adding search_cutoff_ms: 3000 as a search parameter
Laura
Photo of md5-e31442d4d6c849124582a10193fe7721
Laura
06:47 PM
does this parameter improve the response time for the user?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:51 PM
Yeah, in the sense that, if it's a heavy query, it will only tun for 3s instead of spiking CPU for 10s
Laura
Photo of md5-e31442d4d6c849124582a10193fe7721
Laura
06:54 PM
ok. Thanks for your support! Could you upgrade my cluster to this new version, with bug fixes? I looked for a button to upgrade, but I couldn't find it
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:56 PM
Just wrote these instructions today: https://typesense.helpscoutdocs.com/article/135-how-do-i-update-my-cluster-configuration

Let me know if I can clarify anything there
Laura
Photo of md5-e31442d4d6c849124582a10193fe7721
Laura
06:57 PM
Thank you a lot!
06:58
Laura
06:58 PM
I'm reading here, great documentation

1

Typesense

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

Indexed 3011 threads (79% resolved)

Join Our Community