Input Output (I/O) usage in web hosting can sometimes go to the maximum level and take a pause. This guide teaches you what I/O usage is, possible causes for increased Input/Output usage, and how to reduce high IO usage in cPanel.
Today, most servers run Apache which supports CGI and FastCGI scripts written in many popular languages including PHP, Python, Perl, etc.
A small issue in any site can cause a huge number of potential resource consumption resulting in a very high IO usage. By the end of this post, you’ll know how to deal with high usage of I/O.
Let’s start with the definition.
What is I/O usage?
Simply put, it is the speed of data transfer between your RAM and storage (SSD or HDD). I/O limit is the Input Output limit imposed by the hosting provider to limit resource usage.
In cPanel, you can see the Input/Output usage in the stats (right panel), when it goes to red, it means that you have used the maximum allocated limit. Since I/O is the speed of transfer, it goes back to normal once the transfer is completed.
Why is IO usage so high? (common causes)
We will now see the common reasons why IO usage goes so high in web hosting.
To begin with, you can check the Apache logs and try to figure out the reason for the high I/O. The logs contain the list of all processes and errors.
So, if the high I/O is caused during a specific task, you have the culprit. Now, you can focus on optimizing that task. Usually, you will find the file or URL in the logs.
You can start your investigation from there.
Malware or hacking attempts
You might not be a victim of a massive attack. However, even small DDoS attempts might increase your IO usage. Installing a good security plugin will help you in preventing this.
Misconfigured cron jobs or scheduled tasks
If your backup and security scan is scheduled at the same time, it might result in a very high IO activity. So, make sure you have properly configured cron jobs and scheduled tasks are running at midnight when there is the least amount of traffic on your site.
Resource-intensive scripts or applications
Unknowingly, if you have installed a script, plugin, or app that uses too many resources, your IO increases along with CPU usage and RAM consumption.
Heavy website traffic
If you are experiencing an unusually high number of visitors to your website, it’s common to experience high IO. Looking at the IO usage chart in cPanel will also help to identify if high traffic is the problem or not.
You can tally it with the visitors’ graph.
As we already mentioned above, scheduled tasks such as backups might consume a lot of I/O. Make sure these processes are optimized.
It rarely happens. However, we shouldn’t overlook poorly optimized database queries. If your query contains a lot of strings or there is a huge number of simultaneous database connections, your I/O increases.
Large file uploads or downloads
Uploading or downloading large files or multiple smaller files requires a lot of back-and-forth transfer between RAM and storage. This results in high I/O.
So, it’s recommended to add large downloads to an external server.
How to reduce IO usage in cPanel?
Let’s talk about the solutions to reduce IO usage in cPanel.
Implement caching mechanisms
Your first goal should be to apply caching on the server level (such as Varnish cache in cPanel). If it’s not available, you can use third-party plugins as well.
WP Rocket for WordPress is pretty good.
Caching will significantly decrease the number of requests and frequency sent to the server resulting in a decrease of IO usage as well. If fewer transfers are made between RAM and storage, the IO remains in range.
Use a CDN
CDN helps you distribute traffic by serving the visitors from their nearest location. If your IO has increased due to a high number of visitors, using CDN will solve the issue.
Use Trusted WordPress Plugins and WordPress Themes
Using plugins and themes from untrusted sources will result in malicious code or unoptimized cron jobs. So, you might experience a high amount of resource usage.
It also puts your website at risk.
So, it’s highly recommended to use a trusted marketplace or hire a good developer if you are making custom plugins. Nulled plugins and themes look attractive at first but it costs you a lot more than money.
Use less plugins
Using less plugins is advised if you have a lower web hosting plan. If you are on a 512 MB RAM shared hosting plan and you’re using more than 15 plugins, your resources will surely exceed its limit.
So, in that case, you should use fewer plugins.
Upgrade your hosting
The last option is to either upgrade your shared hosting plan or migrate to a VPS. In some cases, the hosting provider isn’t good enough due to which you’re facing this issue.
Therefore, at Web Hosting Advices, we always recommend going with one of the best hosting providers.
IO usage increases for a variety of reasons. It’s highly recommended to optimize your website instead of directly upgrading to a new plan or increasing the IO limit.
Once you find the root cause, you can take the next steps.
If the root cause is a high number of plugins or a high amount of traffic, you can plan to upgrade. Alternatively, you can go with cheap virtual servers instead of upgrading your shared hosting plan. It will cost you almost the same.
FAQ (Frequently Asked Questions)
How to check IO usage in Hostgator?
You can see IO usage in HostGator on the right panel. It’s where all the other cPanel server stats are given.
How much IO usage am I allowed for Godaddy?
The amount of usage on GoDaddy depends on the plan you’re in. You can head over to statistics to know more about the I/O limit.
How to calculate IO usage?
I/O usage is the speed of transfer between RAM and disk (SSD or HDD). You can see the speed calculation in the resource usage of cPanel.
Alternatively, you can use commands like iotop (requires root user permissions sometimes) or iostat to learn more about IO usage.
What happens when IO reaches its limit?
When IO reaches the limit, your website slows down or even hangs for a while. The website goes back to normal when the transfer is completed and the IO speed comes back to normal.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?