Any novice web programmer sooner or later decides to host his site and begins to study the offers of providers. Tariff plans include various parameters, one of which is the "allowable statistical load (CP)". Let's try to figure out what it is and what it affects.
What are CP and CPU?
So, you finish working on your site and are preparing to proceed to the next step - transferring it from your local server to hosting. When choosing a tariff plan, you discovered a mysterious phrase: "Permitted load 65 CP per day." How is this parameter calculated? And most importantly, is the maximum load of 65 CP - a lot or a little?
CP (cpu points) is a value that shows the amount of time spent by the processor on processing tasks. Usually, two parameters are indicated on the hosting: the load on the central processing unit (CPU - Central Processing Unit) of the web server and the database server (MySQL).
Web server CPU load
CP shows the amount of time, in minutes, spent executing all processes. For example, this means that the processor time was 0.2 minutes (i.e. 12 seconds). The data of all clients received during each hour is added up and entered into the database. If the received number exceeds the permissible value set by the provider, then in the next period (hour) all processes will work with a reduced priority. To find out the permissible maximum value, you need to divide the allowed load by 24. Thus, if this parameter is on the hosting, it turns out 65/24 = per hour. This means that if the total execution time of the processes of all clients is more than 2 minutes. 43 sec., The next hour the priority will be lowered.
These values are measured by the Process accounting system in Linux OS; the data is displayed on the hosting control panel (not to be confused with the site control panel).
MySQL server CPU load
In this case, CP is measured not in minutes, but in seconds. The phrase "allowed load of 2500 CPs for MySQL per day" means that the allowed total load per day is 41 minutes. 40 sec., But no more than 1 min. 44 sec. at one o'clock.
What does CP depend on?
The CP value depends on many reasons: the topic and site traffic, its settings, the availability of modules, etc. The more the site materials are in demand by users, the higher its traffic. You can't just estimate the load that the site will create on the server, you can only name the predicted value, and only after a detailed study of its pages.
How much workload should a novice web programmer choose?
In most cases, the minimum that is offered by the simplest hosting plans is quite enough for the first site. After indexing, the pages of the site will appear in the search engine results; the number of users will gradually increase, which means that the load on the server will increase. From now on, you need to periodically review the static load graphs, usually presented on the main page of the hosting control panel in the form of a diagram. If the indicators are close to critical, it is necessary either to change the tariff plan, or to increase the daily limit (depending on the conditions determined by the provider).