WordPress resource consumption


WordPress executions

Before starting with details, I think it would be good to explain “why hosting service providers count the executions?” and “why lowering them ensures smooth performance?”. Based on my experience on the field, I can say for sure that hosting companies pay attention to executions and overall performance. It happens because increased usage of server resources may affect the other users hosted on the same server. The main idea is to guarantee the fair share of the resources.

What is the connection between WordPress executions and CPU usage ?

Well, that is easy. Usually a high number of executions requires more CPU. The things however, going further. If your account generates a lot of executions with low real time CPU this means that your website is well known with a lot of visitors. Alternatively your website may contain malicious files or it is a target of DDoS attack. The opposite is low number of executions with high CPU time. The only conclusion in this case is poor coding. Perhaps some of the additional plugins do not work as good as expected.

So, how to proceed when the alarm is sounded ?

Traffic flow analysis

Usually the hosting service providers offer tools to analyse the flow and find a solution. In this particular case, we will review the options in Awstats tool which is available in all cPanel based control panels.

Hosts – in this part you can find top hosts or IP that visited your website. If you see suspicious activity, you can easily block the offending hosts using IP Deny Manager. This is another handy tool available in cPanel.

Robots and Spiders – nowadays the automated programs that crowl websites are known as spiders or robots. In many cases however, they are quite aggressive and cause CPU spikes. What you can do is block or limit them using robots.txt file. It should place it in the root folder or your website. It should contain instructions about the robots and more specifically what to be crowled and what not. Additionally you can set crowl delay to lower the number of hits.

Pages and URLs – this is another important part of the stats. If you see unusually high number of hits towards the login page, then perhaps some bots are trying to gain access. In this case, I advise you to protect the login form either using plugin or deny rules in .htaccess file

WordPress and Slow Mysql Queries

Another aspect of the whole problem is the interaction between WordPress and Mysql daemon. Considering the fact that by default WordPress operates with indexed databases, during its normal functionality no slow queries should occur. The situation however, changes when there are poorly coded plugins or the database got too large. When it happens, Mysql daemon needs more time to handle the query and return results. If the time frame is over a second, then this is slow and the query itself gets into mysql slow log. Mysql puts it in slow query log and starts working slowly because other queries are made while the daemon is trying to work on the slow one. The ultimate effect of this is slowly working website or server.

What to do when the reason for the low speed are slow Mysql queries ?

More or less this problem requires the attention of a professional developer familiar with the specifics of your website. Random actions such as clearing logs or tables may affect the normal functionality of the entire website. I advise you to proceed this way only if you are sure what is the ultimate effect. If you have slow queries, then they need to be analysed and carefully fixed. Note that Mysql restart is only temporary solution, so you should not rely on it. If no developer is available at the moment, you can open PhpMyAdmin tool and find the largest tables. Once done, you may disable the plugin that puts or gets data from it. Another option is to look for transient records and remove them using plugin. Large number of transient records in wp-options table could usually result in slow performance.

Summary
WordPress resource consumption - issues and solutions
Article Name
WordPress resource consumption - issues and solutions
Description
WordPress resource consumption issues - what consumes server resources. How to identify the top consumers and reduce the usage. Dealing with poorly coded plugins. Wordpress memory and CPU usage problems.
Author
Publisher Name
wppotion


Do you want to share your opinion?

Your email address will not be published. Required fields are marked *


*

Рязане и пробиване на бетон Сканиране на бетон Безвзривно разрушаване на бетон
We are not industry specific. We are WordPress specific. We work with everyone to help find solutions for the troubles.
If you show us the problem you are experiencing, we will show you how to fix it. It is that simple.


Easy WordPress automation

Switching from human control to automation is an essential step in increasing the efficiency of website development or maintenance. During the past decade, WordPress advanced a lot and became a fully functional Content Management System. Thanks to some of its internal features a large portion of its functionality could be easily automated. The following articles give ideas on how to apply successful automation:

Speed up WordPress

Speed is an important matter when it comes to website success. In order to appear on the first page except for applying the well-known SEO techniques, you will also have to pay special attention to the performance of your website. We have reviewed a number of options and prepared articles for the most important aspects that include database management and dealing with different types of content:

Extend WordPress features

Extending the standard WordPress functionality by building new features was always a hot topic. Developing themes that provide next-level User Experience could also be described similarly. Thanks to the established standards WordPress developers could create standardized extensions that can be downloaded from the official repository. In the following articles, we described some simple techniques that would help start developing your own extensions:

wppotion - powered by persistence and passion