What is CPU Limit and what are it's restrictions?

What exactly does CPU consumption imply, and why is it restricted?

There is a CPU in the machine you're reading this on (whether it's a PC, laptop, tablet, phone, or something else). This processor, also known as the central processing unit (CPU), performs all of the computations for all of the programmes running on your computer. Your computer will slow down, possibly to the point of being useless, if these programmes consume too much processor power.

A processor is also present on the servers that host your website. These processors are responsible for a variety of functions, but the majority of their time is spent running processes that execute website (PHP) script. And, just like your own computer's processor, if the server's applications consume too much processing power, the server will slow down to the point of being unusable.

Users want their websites to load quickly, so we don't want our servers to slow down because their processors are overcrowded. To avoid this, each hosting account has a limit on the amount of CPU power it can consume. When this limit is reached, the hosting account will be slowed down first. If it continues to consume too much CPU power, the account will be suspended for 24 days to keep it from using more of CPU usage.

How is CPU consumption determined?

For a variety of reasons, the mechanism by which CPU consumption is calculated, as well as the values that enter the limit, are classified:

  • The calculations are difficult to comprehend and justify. You can't use CPU limits to improve your website or compare hosting companies even if you know what they are.
  • We don't want to overburden the servers. One of the ways we do this is through the CPU limit, but it's only a means to a goal. We don't want cheaters to try to go around the rules by using a disproportionate amount of processing power, and disclosing accurate statistics might make it easier for them to do so.

There is also a restriction to how much CPU power your account can consume at any given time. This is done to protect the servers from being overloaded by a brief rush of traffic. The amount of times you reach this restriction may be taken into account when determining your daily CPU limit.

How can I lower my CPU usage?

There are essentially two key elements that influence the amount of CPU use your account receives:

  1. The more code that is executed and the more difficult tasks that it must complete, the more CPU power is consumed.
  2. The more visitors your website receives, the more PHP code must be performed in order to render their pages, using more CPU power.

You should also check at your account's Daily Hits and Entry Process consumption to get an idea of how much each of these factors influences your consumption.

There are a few things you may do to lower your CPU consumption if you keep these two factors in mind.

  1. Scripts and plugins that aren't needed should be removed. The less code that must be performed, the less CPU will be required.
  2. Incorporate caching into your website. By repeating the results of previous requests, data caching on your website can reduce code execution.
  3. Scripts and websites are being split amongst different accounts. If you have many domains on the same account, you can split them up into different accounts to distribute the server load.

How can I increase my CPU usage?

On free hosting, the CPU allocation cannot be adjusted on demand. We handle all accounts equally and will not provide unfair perks to customers simply because they ask for them.

Please consider upgrading your account to premium hosting if your CPU utilization is still too high after following the instructions below (or if you are having difficulties applying the tips to your website).

The CPU usage limitations on premium hosting are significantly larger than on cheap hosting, allowing your website to continue to expand. When you add in other premium hosting benefits like free SSL certificates, Cloudflare RailGun, and an award-winning cloud hosting infrastructure, you can rest assured that your website will remain fast and stable.

Why was my website suspended when it had no traffic?

Do you have Cloudflare installed on your website? If this is the case, go to Cloudflare's website and look at the Analytics tab. When users declare they have "no traffic" and install Cloudflare, it's possible they've been hit by a wave of bot traffic, causing a lot of CPU consumption. This traffic should be visible in Cloudflare's Analytics system. Website analytics solutions, such as Google Analytics, are unlikely to show this traffic, therefore you should focus on Cloudflare's.

Why was my website suspended while I was just getting it up and running?

Keep in mind that both traffic and code complexity contribute to CPU use. Installing scripts, importing content, and installing plugins and themes are all difficult activities that demand a significant amount of computing power. You can easily generate a lot of CPU utilization if you make a lot of modifications like that.

Doing some of your testing on your own computer is one method to get around this. You can also run your website on your own computer using software like XAMPP or WampServer and test everything there. You can migrate or replicate your configuration to your hosting account once you're happy with it.