It very easy to test your disk’s performance with dd command.
You can measure performance of write operation with below command.
1 2 3 4 |
[root@remotekernel ~]# sync; dd if=/dev/zero of=testfile bs=1M count=1024; sync 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 4.06852 s, 264 MB/s |
You can measure performance of read operation with below command too.
1 2 3 4 |
[root@remotekernel ~]# dd if=testfile of=/dev/null bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 1.46343 s, 734 MB/s |
But there is one thing more to measure your real read operation performance, when you write the file, your file was cached. Firstly, we will clear the buffer then test is again.
1 2 |
[root@remotekernel ~]# /sbin/sysctl -w vm.drop_caches=3 vm.drop_caches = 3 |
1 2 3 4 |
[root@remotekernel scripts]# dd if=testfile of=/dev/null bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 3.80218 s, 282 MB/s |
As you see our read speed is more slow than first test.