Updated on March 13, 2024.
It is the 21st century and everyone is in a hurry. No one today has the time or will power to sit waiting unnecessarily while an application or website loads on their computer.
Now imagine this scenario from a business’s perspective. The person in question could have been a potential customer.
So, it’s imperative for a business to quickly find the answers to questions like, why my website loads slow or how do I figure out why my website loads slow.
Read details in a report by IDC.
Why is my website slow?
When a user clicks to access any information, a request is shot to the web hosting server. Now, in the server, the data resides on files that are stored in Hard Disk Drives (HDDs) or more commonly, disks.
To read the user requested data, the disk rotates to reach the required disk sector. This leads to waiting time, although of a few milliseconds, when the processor waits for that file to be read. (Similar thing happens during the write operation).
Also Read: Data Localization – a look at the changing data protection regime in India
This access time gradually adds up as the data-heavy servers process innumerable data requests and thus, retrieving the data from the storage device becomes a performance bottleneck.
Thus, to prevent application performance hiccups from disk latency, it is important to monitor disk usage and disk I/O for possible performance issues, so that you can see which application is using the disk as an important part of its core functionality.
Keep reading for understanding disk I/O and how to check disk I/O performance in Linux and Windows.
What is Disk I/O?
Disk I/O includes read or write or input/output operations (defined in KB/s) involving a physical disk. In simple words, it is the speed with which the data transfer takes place between the hard disk drive and RAM, or basically it measures active disk I/O time.
It is a measure of performance and is thus used to characterize the storage devices like HDDs, SSDs and SAN.
Also Read: Rethinking data security: 5 ways encryption can help to protect your data
It enables you to monitor the Read and Write operations of logical disk on your system and set thresholds. You get alerted if below-mentioned metrics reach the levels preset by you:
- Writes/sec – write operations rate.
- Reads/sec – read operations rate.
- Busy time – the % of the elapsed time when your particular disk drive was busy in servicing write or read requests.
- Queue length – the number of requests on the disk that are in the queue.
Managed Alibaba Cloud
Cheaper, Faster & Secure Cloud Hosting
How to check disk I/O performance in Windows OS and Linux?
#1 Monitoring Linux Disk I/O activity using IOTOP and IOSTAT commands
First of all, type top command in the terminal to check the load on your server. If the output is not satisfactory, then look into wa status to know the status of Reading and Write IOPS on the hard disk.
Also Read: What is Digital Information Security in Healthcare Act (DISHA) in India?
If it is high, then we need to check I/O activity in Linux box using the iotop or iostat commands. By using iotop command, you can monitor the disk utilization by individual processes.
- Let’s first start with iotop command
Type the command:
You will get the following output:
By typing the iotop command with o option, you will get the actual I/O activity.
Note: Only the root user or a user with administrative permissions (through mechanisms like sudo) can execute it.
Output:
• With iostat command
With the help of iostat command, you will get the individual hard disk I/O activity.
Note: ‘iostat’ is part of the sysstat package and may need to be installed separately. The below screenshot shows 28 and 17 percent of the utilization of disks.
#2 Monitoring Windows Disk I/O utilization
With the help of the Windows Performance Monitor tool which is available in all versions of Windows, you can easily monitor the Windows disk usage.
There are already many pre-loaded counters, select all and press the DEL key.
Tap +sign and select the “Physical Disk” from the various “Performance Objects”.
The list of available counters appears.
Note: You can select that instance which you want to monitor. By default, it will select _Total. (This graphical interface is different for the Windows Server 2003 and 2008 R2.)
Here, we select the below four counters. Don’t forget to click on Add after selecting each one.
- Avg. Disk sec/Transfer
- Disk Bytes/sec
- Disk Transfers/sec
- Avg. Disk Bytes/Transfer
If you want to know the current values only, you can change the “view” from Line to Report in the graph tab.
You get the actual values as below:
Here, the Avg. Disk Bytes/Transfer provides the IO Size, Avg. Disk sec/Transfer is related to Average Latency, Disk Bytes/sec is equal to Throughput and last Disk Transfers/sec is IOPS.
Some important points:
- Latency is expressed in milliseconds and this performance tool provides you the values in seconds, so change accordingly for e.g. 0.020 sec = 20 ms.
- IOPS is expressed in ops/sec (operations per second).
Read details in a report by Forrester.
Wrapping up:
After effectively monitoring the disk IOPS utilization, you can plan accordingly for system upgrades in advance. You can even early detect the potential causes of storage subsystem failures and can reduce the risk of unexpected downtime as well.
ZNetLive provides both Linux and Windows web hosting with the disk monitoring capabilities so that you can monitor the possible performance issues of your applications and can take timely decisions.
If you have any questions regarding how to check disk io in Linux or how to check disk IOPS in Linux, please ask or add in the comment section below.
Services ZNetLive offers:
Hello There. I found your blog using msn. This is a really well written article. I will make sure to bookmark it and come back to read more of your useful information. Thanks for the post. I’ll certainly return.
For monitoring I/O on Windows, I searched and reached on this article and it is very good. Simple and useful. Thank you.
Was searching for I/O monitoring on Windows and reached this blog, found it useful and concise. Thank you.
I want the network and disk utilisation report for last 2days
How to pull it
Hi Rahul,
This tool does not maintain any database as it provides all reports on real-time basis only. However, you can install monitoring tools like https://www.paessler.com/prtg and https://www.manageengine.com/network-monitoring/ to manage your database and get the report as per your requirement.
Keep sharing your knowledge. Thanks for this very informative blog!