Linux - How to perform I/O performance test with dd command

Linux - How to perform I/O performance test with dd command

 
Question : How to perform I/O performance test in Linux to find r/w speed?
Answer :  It can be achieved using dd command.

Example to test write speed :
1. Go to the directory location where you want to perform the test.
[root@server ~]# cd /dir

2. Run dd command below.
[root@server ~]# dd if=/dev/zero of=dd.data bs=4k count=200000 conv=fsync
200000+0 records in
200000+0 records out
819200000 bytes (819 MB) copied, 8.47374 seconds, 96.7 MB/s

[root@server ~]# ls -la
total 801588
drwxr-xr-x 2 root     root          4096 Oct 22 12:51 .
drwxr-x--- 5 root     root           8192 Oct 22 12:51 ..
-rw-r--r-- 1 root     root     819200000 Oct 22 12:51 dd.data


Example to test read speed :
[root@server ~]# time time dd if=/path/to/bigfile of=/dev/null bs=8k

                              if = name of input file
                             of = name of output file
                             bs = size of block
                        count = number of block
                         conv = fsync - flush data at the end of the copy
                                   dsync - flush data after every block of the copy
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
How to run command or code in parallel in bash shell under Linux or Unix
Viewed 4089 times since Tue, Aug 6, 2019
How to stop and disable auditd on RHEL 7
Viewed 42183 times since Tue, Aug 6, 2019
ubuntu How to Reset Forgotten Passwords in Ubuntu 16.04
Viewed 4600 times since Tue, Dec 8, 2020
15 Linux Yum Command Examples – Install, Uninstall, Update Packages
Viewed 4341 times since Thu, Oct 25, 2018
How to Synchronize Directories Using Lsyncd in Linux
Viewed 15270 times since Wed, Oct 31, 2018
LVM: Create a new Volume Group
Viewed 2690 times since Sat, Jun 2, 2018
Red Hat Enterprise Linux - Allow Root Login From a Specific IP Address Only
Viewed 3548 times since Wed, Oct 3, 2018
LUKS List available methods of encryption for LUKS
Viewed 3672 times since Fri, Jul 13, 2018
Manage Linux Password Expiration and Aging Using chage
Viewed 5940 times since Tue, Sep 11, 2018
Tip: SSD and Linux. Enable TRIM and check if it works
Viewed 18284 times since Fri, May 15, 2020