Random vs Sequential IOs

Sequential means forming or following in a logical order or sequence. Random is anonym of the Sequential which means that without any logical sequence.

Let’s understand the concept with the explanation. We will also answer Mr Justin’s questions in detail.

Sequential IOs:

Edit Image

As you see the IOs are flowing from A to G in sequence. Similarly, the read/write head will continuously use subsequent blocks for reading or writing operations.

As we know disk spindle is always in motion. Therefore sequential writing is a time-consuming affair as the head needs to wait for a block in the sequence during the spindle rotation. But sequential write will be faster as there is very limited head movement during this operation.

Random IOs:

Edit Image

Whereas, in the case of Random IOs you can see that, the IOs are flowing without any logical sequence. It is easy for the read/write head to write the IOs on any block on the disk. Therefore the performance of random write is great. At the same time, read performance of the random IO is poor compared to Sequential read is slow.

Edit Image

Most of us would have played a board game in childhood. When we spin the dice, it generates a random number, but when we move the counter we always move them in sequential order.

As we know sequential writing is slow compared to Random write. But it is super fast when it comes to sequential read compared to random read.

I hope the concept is clear for all of you. But if you still have any doubts please feel free to add comments and I will do my best to answer them as soon as possible.

Leave a comment