Has your website recently slowed down or has your VPS started lagging unexpectedly? It can be really frustrating. You restart the server and free-up some disk space, but the slow-down still occurs. Most likely, you have a bottleneck; one part of your system has gummed up the works and everything in your system is now slow. The good news is that based on where your bottleneck is located, you can find it and fix it fairly quickly.
To speed things up, you will want to want to identify what is causing the system to slow down. You won't be able to fix the slow down if you do not know what the reason is; just like you cannot fix a car unless you can identify what the problem(s) may be.
If the issue is coming from one of the apps or plugins running in your environment, be sure to remove, or at least disable any not actively used. If you have the ability to take the additional step of adding in caching tools, even better!
2. Resources: Upgrade VPS
If your traffic or workloads have increased, your VPS maximum will not be high enough. Elevating the CPU, RAM or quickly freeing up blocks on SSD storage will go a long ways.
3. Change Server Settings
Tweak limitation in server settings, such as the database or cache size, connection limits or workers in NGINX or MySQL. Sometimes, it's astonishing to consider the performance improves just by making nominal changes, and worthwhile effort
4. Monitoring Again
Once you fix things, don't simply walk away from it! Utilize netdata, Grafana or CloudWatch to monitor states, even for the long haul! This way, who really has the time constraints or energy to worry about possible issues before it progresses into a real problem.
To speed things up, you will want to want to identify what is causing the system to slow down. You won't be able to fix the slow down if you do not know what the reason is; just like you cannot fix a car unless you can identify what the problem(s) may be.
Here are more detailed items to investigate
- CPU (Processor): If your CPU is capped out, or approaching 100% - your VPS is under stress. Use the top, or htop command in Linux to determine which program is using all of your CPU.
- Memory (RAM): You may not have enough RAM, and this will slow down your system. To check RAM use free -m.
- Disk Usage: If you have applications, or files that take a long time to launch there may not be fast enough, or the storage is too full. Use iostat, or iotop to determine disk usage.
- Network: If you have slow page loads or timeouts, the network may be the issue. Run a simple ping test to determine what kind of internet speed you have and your connection.
Let's take the following steps to remove the bottleneck:
1. Remove your appsIf the issue is coming from one of the apps or plugins running in your environment, be sure to remove, or at least disable any not actively used. If you have the ability to take the additional step of adding in caching tools, even better!
2. Resources: Upgrade VPS
If your traffic or workloads have increased, your VPS maximum will not be high enough. Elevating the CPU, RAM or quickly freeing up blocks on SSD storage will go a long ways.
3. Change Server Settings
Tweak limitation in server settings, such as the database or cache size, connection limits or workers in NGINX or MySQL. Sometimes, it's astonishing to consider the performance improves just by making nominal changes, and worthwhile effort
4. Monitoring Again
Once you fix things, don't simply walk away from it! Utilize netdata, Grafana or CloudWatch to monitor states, even for the long haul! This way, who really has the time constraints or energy to worry about possible issues before it progresses into a real problem.