Wondering how to reduce server load? We can help you.
All of us want our sites to be up round the clock. However, a major concern is the load speed of the website.
As part of our Server Management Services, we assist our customers with several Server queries.
Today, let us see effective methods to reduce the server load.
Server load
As we all know, the load speed of websites mainly depends on the constant load that the server is maintained. A downfall is that we can’t monitor the server load at all times.
However, to know the server load, we can use the below command:
# uptime
8:14am up 270 days, 13:23, 2 users, load average: 3.79, 4.15, 4.39
Since our Support Techs see a lot of load issues on a daily basis, here are few steps to follow to decrease the load in the server.
What causes high load in the Server?
Few common things that cause high server load are as follows:
- Memory shortage issues with the server.
- MySQL queries are more on the server.
[root@host ~]# mysqladmin proc stat +——–+——+———–+—-+———+——+——-+——————+ | Id | User | Host | db | Command | Time | State | Info | +——–+——+———–+—-+———+——+——-+——————+ | 954983 | root | localhost | | Query | 0 | | show processlist | +——–+——+———–+—-+———+——+——-+——————+ Uptime: 443376 Threads: 1 Questions: 13376805 Slow queries: 15 Opens: 2211 Flush tables: 1 Open tables: 611 Queries per second avg: 30.170
- If the site is using WordPress with more unwanted plugins and themes.
- Poor configuration of Apache/MySQL services.
- Heavy traffic caused by any IP addresses can raise the more number of HTTP connections in the server.
netstat -plan |grep 80|awk ‘{print $5}’ |cut -d: -f1 |sort |uniq -c |sort -n
- The server load will be high if there are more frozen mails in the queue.
exim -bpr | grep frozen | wc -l
How to reduce server load
In order to reduce the server load, our Support Techs suggest the following steps:
- In case of memory shortage issues, we increase the memory size of virtual RAM.
- If the MySQL queries are more in the server, we decrease it by optimizing the MySQL.
Executing “mysqladmin proc stat” command, will give us the MySQL user with a number of slow queries running in the server.
We can reduce the MySQL slow queries by optimizing the different values in the MySQL configuration file. - From the Apache domlogs of a particular domain, we can find the unwanted plugins and themes causing high server load. To reduce the server load we can disable those plugins and themes.
- We can improve the standard of MySQL and Apache configuration by optimizing the MySQL and Apache services.
- We can reduce the network traffic by blocking the IP addresses which is causing more HTTP connections.
- The load in the server will reduce once if we delete the frozen emails in the Exim queue:
exim -bpr | grep frozen | awk {‘print $3’} | xargs exim -Mrm
[Couldn’t reduce server load? We’d be happy to help you further]
Conclusion
In short, the load speed of websites mainly depends on the constant load that the server is maintained. Today, we saw few steps to follow on how to reduce server load.
0 Comments