This article will investigate an impact of modern SSDs on the I/O bound algorithms of HDD era.
Improved write speed of SSD
Modern SSD provide read/write speeds up to 500Mb/sec. Compare it to approximately 100Mb/sec cap on the speed of modern HDD. It means that your application has to produce the output 5 times faster than before in order to still be I/O bound.
Let’s make 3 tests:
Fill an 8 Gb file with a repeating sequence of 1024 bytes using a
BufferedOutputStreamwith 32K buffer size. Data will be written in a loop, no extra processing is done inside the loop (
testWriteNoProcessingmethod from the following code snippet ).
Fill an 8 Gb file with a sequence of 1024 bytes which is recomputed before writing it on the every iteration. Data will be written using a
BufferedOutputStreamwith 32K buffer size (
- Same as previous test, but data will not be written to disk. This test will estimate how long does it take to prepare the data to write.