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
RHEL: Adding a boot entry to GRUB/GRUB2 configuration
Viewed 4509 times since Sun, May 27, 2018
How to Clear RAM Memory Cache, Buffer and Swap Space on Linux
Viewed 2438 times since Mon, Nov 23, 2020
A tcpdump Tutorial and Primer with Examples
Viewed 5018 times since Sun, Jun 17, 2018
Using etckeeper with git
Viewed 6755 times since Sun, Jun 3, 2018
6 easy steps to setup offline two factor authentication in Linux
Viewed 12602 times since Mon, Apr 6, 2020
LVM: Reduce an existing Volume Group by removing one of its disks
Viewed 2440 times since Sat, Jun 2, 2018
Linux – Securing your important files with XFS extendend attributes
Viewed 7466 times since Wed, Jul 25, 2018
Kernel sysctl configuration file for Linux
Viewed 5140 times since Fri, Aug 3, 2018
How To: Linux Hard Disk Encryption With LUKS [ cryptsetup Command ]
Viewed 7239 times since Fri, Jul 13, 2018
Df command in Linux not updating actual diskspace, wrong data
Viewed 2777 times since Wed, May 30, 2018