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 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

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
There are no attachments for this article.
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
RHCS6: Install a two-node basic cluster
Viewed 685 times since Sun, Jun 3, 2018
How To Find Largest Top 10 Files and Directories On Linux / UNIX / BSD find
Viewed 425 times since Mon, Oct 29, 2018
3 Ways to Check Linux Kernel Version in Command Line
Viewed 663 times since Fri, Apr 19, 2019
ZFS: Verify/change properties of a zfs filesystem
Viewed 614 times since Sun, Jun 3, 2018
Yum Update: DB_RUNRECOVERY Fatal error, run database recovery
Viewed 276 times since Fri, Jan 17, 2020
Linux - How to get CPU information
Viewed 471 times since Fri, Jun 8, 2018
10 Linux rsync Examples to Exclude Files/Directories
Viewed 475 times since Wed, Oct 31, 2018
Setting up encrypted tunnel using stunnel
Viewed 409 times since Fri, Sep 28, 2018
A Simple Guide to Oracle Cluster File System (OCFS2) using iSCSI on Oracle Cloud Infrastructure
Viewed 1063 times since Sat, Jun 2, 2018
How to use yum command on CentOS/RHEL
Viewed 1041 times since Wed, Oct 17, 2018