how do i know when it's time to get a dedicated CPU?

i have a question a couple questions about shared CPU instances. i was reading this Linode guide:

[url]https://www.linode.com/docs/products/compute/compute-instances/plans/choosing-a-plan/#shared-cpu-instances[/url]

and it basically explains how shared CPU instances are good for "low to medium" traffic, so my first question is what exactly does "medium" traffic mean?

i had a spike in users yesterday and my site didn't do great during it, so i'm considering moving to a dedicated CPU instance, but i'm not sure if there's other things i can do to mitigate the latency without necessarily spending more on my own box. my other question is, say I was using about ~50% of my CPU during the spike on the shared CPU box, and my response times for web pages were about 1-1.2 seconds long, is there any way i could go back to the spike and see if my shared box was being throttled? i know about the sudo iostat -c 1 10 command, but that doesn't help me as much now that the spike is over

essentially what i'm asking is, how exactly do i know when i need to go from shared -> dedicated CPU?

(i had about 8000 users that didn't have adblocker yesterday come to my site throughout the day)

1 Reply

I could be wrong, but I don't think the slow 1-2 second response time would be directly related to the 50% cpu spike. Rather a spike is a symptom of something that also causes the page to load slow, like an outdated or misconfigured package in your setup. Also keep in mind the graphs that come with your linode are 5 minute averages, so if you see a 50% spike on the cpu graph there's a chance it could've gone higher.

A shared CPU should be stable up to about 80% of its usage. If you spike higher than that on a core you could run into issues.

So if you are spiking to 80% (or higher) or consistent usage is already close to that I would consider a dedicated vps if multiple cores doesn't solve cpu usage.

i know about the sudo iostat -c 1 10 command, but that doesn't help me as much now that the spike is over

I use Netdata personally. Other than the installation or startup it doesn't use much cpu since it takes advantage of the efficiency of bpf when it can.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct