CP time and request priority

What is it?

The CP time is the time that the processor spends processing the request (execution of one script). The CP time only includes the time that the processor actually works on the request. The CP time does not include the time when other parallel queries are being processed (e.g. requests of other shared hosting clients) or when the server is waiting for the response from the third-party resource (e.g. the other website your website refers to). Therefore, the CP time in most cases will be significantly less than the actual execution time of the script or page generation.

What does it depend on?

The amount of time needed for the processor to process your request only depends on the efficiency of your code and database queries. If it takes too much time to generate a website page, you should optimize the code or revise the request architecture of your website.

CP time priority

The operating system assigns a priority to a request and puts it to the queue with other requests before this request is being handled by the processor. All the user requests are equal on our hosting because they are given the same priority. However, if the hosting service reaches the set limit for CP time, the priority for the requests for this service will be lowed for the current calendar day. The requests with a lower priority get 4 times less processor time to execute than the requests with a regular priority.  This is not noticeable to the website visitors in normal mode. But if the server is overloaded, the requests with lower priority will be processed a little longer.

Numbers and tips

Averagely the shared hosting processor handles about a hundred requests per second. This means that if your website page is generated within a second, the processor may spend about a hundred times less time processing this request. The CP time, in this case, might be from 0.01 to 0.1 seconds – this is the usual time for the request to be processed.

The regular website or blog uses about 5 minutes of CPU time each day. A heavier blog with many plugins, cron jobs, and a theme with a lot of widgets can take 50-60 CP minutes per day. Our limit of 120 CP minutes is the most optimal solution and the best offer on the shared hosting market at the moment. If your website requires more than 120 minutes of processor time per day, this is a sign that the project has grown and it is time to transfer it to a more efficient tariff. For example, Managed VPS.

Rate this article
Share this article
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
In this article