I
I
Ilya Saveliev2020-04-15 12:12:27
WordPress
Ilya Saveliev, 2020-04-15 12:12:27

How to detect CPU usage in index.php Wordpress?

Hello comrades.

I apologize for the possibly noob question, but there is such a problem: virtual hosting is given, on which there are about 30-40 sites with different traffic (an average of 200 hosts for each site). All sites on Wordpress (regular informational sites without any service) with d-wp hashing enabled.

In cPanel, the total CPU load is always around 90-95%. And this despite the fact that I have the highest tariff with a maximum load of 300% on the CPU (attached a screenshot of the tariff parameters).

5e96ceb1287e2307619763.png

The TP only managed to extort the top -c command to view the load on the CPU, otherwise they said deal with your CMS yourself.

Here you can see that all calls with the load on the CPU go to index.php at the root of each site (and the load is different and sometimes reaches 50% for 1 site):

5e96cf6f90189499098222.png

So the question is - you can somehow see in more detail who or what creates such a load and what generally happens inside when accessing index.php?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2020-04-16
@HeadOnFire

The fact is that index.phpthis is the entry point, there are only a couple of lines of code. This is not one isolated script with all the features that you can somehow debug. It brings up the whole core of WP, there are thousands of other files. Code profiling is used for debugging - Xdebug, XHProf, Tideways, Blackfire. On shared hosting, of course, this will not happen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question