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
HowTo: The Ultimate Logrotate Command Tutorial with 10 Examples
Viewed 7526 times since Fri, Nov 30, 2018
A tcpdump Tutorial and Primer with Examples
Viewed 7364 times since Sun, Jun 17, 2018
RHEL: Allowing users to ’su’ to "root" / Allowing ’root’ to login directly to the system using ’ssh’
Viewed 4003 times since Sat, Jun 2, 2018
Linux Add a Swap File – HowTo
Viewed 11148 times since Fri, Jun 8, 2018
RHCS6: Debug and test multicast traffic between two hosts
Viewed 8063 times since Sun, Jun 3, 2018
Use Fail2ban to Secure Your Server
Viewed 16829 times since Fri, Jul 5, 2019
Create a Linux Swap File
Viewed 3910 times since Fri, Jun 8, 2018
RHEL: Forgotten ’root’ password / using single-user to gain access
Viewed 9480 times since Sat, Jun 2, 2018
how to list all hard disks in linux from command line
Viewed 5787 times since Mon, Jan 28, 2019
OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu
Viewed 3645 times since Thu, May 24, 2018