
If you have Windows installed on a slow hard drive, it doesn’t matter how powerful the other components like CPU and memory are, the system will boot slower, load programs more slowly, and lag quite badly while multitasking. That’s better! 509MB/s read throughput is in line with the 356MB/s write throughput.One of the most important hardware components inside your computer is obviously the drive that holds the operating system. So for the correct read speed test with dd, we need to disable I/O caching using this command line : :~ $ sudo /sbin/sysctl -w vm.drop_caches=3 As soon as some process needs memory though, the kernel would release it by dropping some clean caches As you may have guessed, we get such high numbers because of I/O caching that OS cleverly applies when working with files.Ĭaching is done in such a way that kernel would cache I/O as long as it has unused memory. Slightly better I/O for reading is always expected, but such a dramatic improvement is usually false. Problem 2: even if we remove the oflag=direct, results seem to be too good to be true: :~ $ dd if=./test of=/dev/zero bs=512k count=2048ġ073741824 bytes (1.1 GB) copied, 0.159449 s, 6.7 GB/s Problem 1: you get an error if you attempt direct I/O (oflag=direct) with a virtual device like /dev/zero: :~ $ dd if=./test of=/dev/zero bs=512k count=2048 oflag=directĭd: failed to open '/dev/zero': Invalid argument If you try running it though, you’ll have 2 problems.

test file: :~ $ dd if=./test of=/dev/zero bs=512k count=2048 oflag=direct If you apply logic and reverse the if and of parameters from the previous example, you will arrive at the following dd command testing the speed of reading from. Similar results may be achieved using a software RAID from HDDs. That’s a pretty impressive throughput! If the filesystem we’re testing this on is hosted on a single disk, it must be an SSD one. In this example, I’m creating a 1GB file using a fairly large block size of 512KB: :~ $ dd if=/dev/zero of=./test bs=512k count=2048 oflag=directġ073741824 bytes (1.1 GB) copied, 3.11501 s, 345 MB/s That’s why using is one of the easiest ways to understand the storage you’re working with.

Dd command, that is pretty much guaranteed to be pre-installed on your Linux or Unix server, can be used to quickly get an understanding of the I/O capability of available storage.Īlthough there are specialised file processing and I/O benchmarks, you may not always have the time or permission to install additional packages.
