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
LVM: Extend SWAP size by adding a new Logical Volume
Viewed 1086 times since Sat, Jun 2, 2018
red hat 7 tmpfiles service
Viewed 806 times since Thu, Oct 11, 2018
How to Analyze or Read OS Watcher Output in three easy steps -- With Example ?
Viewed 13309 times since Thu, Jun 21, 2018
3 Ways to Check Linux Kernel Version in Command Line
Viewed 9480 times since Fri, Apr 19, 2019
How setting the TZ environment variable avoids thousands of system calls
Viewed 8272 times since Mon, May 21, 2018
Top 20 OpenSSH Server Best Security Practices ssh linux aix
Viewed 4530 times since Fri, May 15, 2020
YUM How to use yum command on CentOS/RHEL
Viewed 3441 times since Thu, Oct 25, 2018
A Quick and Practical Reference for tcpdump
Viewed 9697 times since Fri, Jul 27, 2018
RHEL: Rename a network interface on RHEL 7
Viewed 6867 times since Sat, Jun 2, 2018
tcpdump
Viewed 7133 times since Fri, Jul 27, 2018