Difference between revisions of "Benchmark Tests with Linux"

From Knowledge Center
Jump to: navigation, search
(Created page with "===Disk IO=== 1 GB File written <pre> dd if=/dev/zero of=/root/testfile2 bs=1G count=1 oflag=dsync 1+0 records in 1+0 records out 1073741824 bytes (1.1 GB, 1.0 GiB) copied,...")
 
Line 19: Line 19:
 
</pre>
 
</pre>
  
 +
Write 1GB file with no flags
 +
 +
<pre>
 +
$ sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync
 +
1024+0 records in
 +
1024+0 records out
 +
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.12289 s, 956 MB/s
 +
</pre>
 +
 +
Read from cached buffer:
 +
 +
<pre>
 +
$ dd if=tempfile of=/dev/null bs=1M count=1024
 +
1024+0 records in
 +
1024+0 records out
 +
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.65436 s, 1.6 GB/s
 +
</pre>
 +
 +
Clear the cache and read accurate read speeds:
 +
 +
<pre>
 +
$ sysctl -w vm.drop_caches=3
 +
$ dd if=tempfile of=/dev/null bs=1M count=1024
 +
1024+0 records in
 +
1024+0 records out
 +
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.998637 s, 1.1 GB/s
 +
<pre>
  
 
===Resources===
 
===Resources===
  
 
* https://www.thomas-krenn.com/en/wiki/Linux_I/O_Performance_Tests_using_dd
 
* https://www.thomas-krenn.com/en/wiki/Linux_I/O_Performance_Tests_using_dd
 +
* https://www.shellhacks.com/disk-speed-test-read-write-hdd-ssd-perfomance-linux/
  
 
[[Category:All]]
 
[[Category:All]]

Revision as of 07:34, 28 April 2019

Disk IO

1 GB File written

dd if=/dev/zero of=/root/testfile2 bs=1G count=1 oflag=dsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 10.3055 s, 104 MB/s

512 bytes were written one thousand times

$ dd if=/dev/zero of=/root/testfile bs=512 count=1000 oflag=direct
1000+0 records in
1000+0 records out
512000 bytes (512 kB, 500 KiB) copied, 2.24966 s, 228 kB/s

Write 1GB file with no flags

$ sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.12289 s, 956 MB/s

Read from cached buffer:

$ dd if=tempfile of=/dev/null bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.65436 s, 1.6 GB/s

Clear the cache and read accurate read speeds:

$ sysctl -w vm.drop_caches=3
$ dd if=tempfile of=/dev/null bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.998637 s, 1.1 GB/s
<pre>

Resources