Hi,
In order to define Sequential and Random, it's better not to use a specific example of loading software, especially since you have added in Read and Write.
Therefore, think of it as how they relate to the transfer of data to or from one "place" to the storage disk.
I say a "place", because let's not worry now where it's coming from, just that it's comiomng from outside the storage drive itself.
And there's a difference in how they behave, depending on the TYPE of storage disk.
As in if it's a HDD (spinning disk) or a SSD (solid state drive).
Fundamentally, RANDOM means writing, or reading from or to, RANDOM places on your storage disk: as in all over the place, in no order.
In a HDD, the head needs to physically move to that space, to write or read.
Since it only moves in and out, it therefore moves to the right radius on the disc, and picks up the data as it comes by on the spin.
If it's RANDOM, then it will need to move again, before the next piece of the file can be read, or written.
If it's SEQUENTIAL, then the data will be READ or WRITTEN without needing to move the HDD head.
So you can see that Random operations on a HDD are intrinsically slower than Sequential, all else being equal.
However, when you apply this to a SDD, without moving parts, it's different.
Partly because there is no mechanical movement needed, but also because the actions of READING and WRITING on a SSD are different from each other, and from what happens on a HDD.
This is very simpified, but the idea is that to WRITE data on an SSD, you first need to ERASE a block of NAND flash.
Or at least have an already erased block available.
It's a fairly large part of the total memory (you tend to have many thousands on a given SSD).
And then you can Write data to it (it's usually calld "Program" rather than Write").
And regardless if it's a big piece of data (say 1MB) or a small piece (4kB) you ALWAYS have to erase an entire block to write to it.
To READ, you don't worry about that.
If the data is being Read or Written sequentially, then it's more complex to explain.
It's NOT the same thing as just a faster version of a HDD.
Sequential Writes are written to an entire BLOCK of the NAND data, as compared to Random Writes that are not (written on several).
Reads are the same story.
So the Controller, will see a Sequential command to Write, and do it all to the same block.
A bunch of Random Writes, will as likely to sent to whatever space is available.
And Random reads, obviously it needs to do that in reverse.
Although there is no mechanical head moving, there is still some delay in the various operations, called LATENCY.
When you add that up, it tends to make Sequential FASTER than Random: all else being equal.
However, a lot depends on both how FULL the SSD is, and how big the demand is on it, to right and read.
The SSD NAND Flash interacts with the controller, and other cache (like DRAM, somtimes System RAM, and sometimes the NAND itself) to determine how fast everything happens.
Something called "garbage colection" is involved in terms of freeing up space that's faster to write to.
And the relative as well as absolute speed of Reads and Writes, be they Random or Sequential, happens on what has been done to the SSD before.
So it's quite a delicate balance of:
- Demand on the controller, in terms of VOLUME Reads and Writes, and the TYPE of Reads and Writes (size of data packet, queue depth, sequential or random)
- Free space left
- Type of Space left (if it's SLC, MLC, TLC, QLC or pseudoSLC)
- Amount of over proportioning (special term, you need to look that up)
If there's low demand, and lots of free space, it all goes smoothly, like a juggler with only a few balls.
If the juggler is given a LOT of balls, and has to ride a unicycle, while trying to sign a song, it's much more complex.
This is from Seagate:
"... the need for garbage collection affects an SSD’s performance, because any write operation to a “full” disk (one whose initial free space or capacity has been filled at least once) needs to await the availability of new free space created through the garbage collection process. Because garbage collection occurs at the block level, there is also a significant performance difference, depending on whether sequential or random data is involved. Sequential files fill entire blocks, which dramatically simplifies garbage collection. The situation is very different for random data.
As random data is written, often by multiple applications, the pages are written sequentially throughout the blocks of the flash memory.
The problem is: This new data is replacing old data distributed randomly in other blocks. This causes a potentially large number of small “holes” of invalid pages to become scattered among the pages still containing valid data. During garbage collection of these blocks, all valid data must be moved (i.e. read and re-written) to a different block.
By contrast, when sequential files are replaced, entire blocks are often invalid, so no data needs to be moved. Sometimes a portion of a sequential file might share a block with another file, but on average only about half of such blocks will need to be moved, making it much faster than garbage collection for randomly-written blocks. ..."
A good reference is here:
Seagate
But bear in mind, that some of what Seagate is saying is specific to their own controllers, that can work better with what's called co,pressible data.
However the genewral ideas are applicable to all SSD's.
You should Google about this, and read a number of links: there's a LOT written about this:
Understanding Flash Memory
Flash DBA
Flash Memory
This is EXCELLENT for the graphics, and very well explained definitions:
SNIA Standard
And the SNIA site is good, but takes some patience in reading and THINKING:
The SNIA has developed methods which enable manufacturers to set, and customers to compare, the performance specifications of Solid State Storage devices, which are evolving with the state of the technology. These specifications define a set of device level tests and methodologies which enable...
www.snia.org
Micron has made these three modules which are worth going through:
Micron Training Modules
And this:
Micron White Paper
And going to a more detailed level, here's a link to a NAND flash data sheet:
Micron NAND Datasheet
If you just skim through it, and see the various details about NAND, it's useful.
Page 15 to 19 are good.
They show the schematic of how a given NAND package works.
An SSD will have several packages of NAND, each made up of dies of NAND.
The specifics are not important, but the CONCEPT that you have a faily complex ARRAY of flash, thats' arranged in a specific ORDER (or architecture is a VERY useful idea).
You can see that just for this quiteold type of Flash, there are LOTS of ways to combine it.
And this is only the older 1D variant.
The more modern 3D types are even more complex.
The other useful page 118 (Table 33) is where they summarise the LATENCY of the flash, in terms of how long it takes to do a specific operation:
Block Erase Time: 0.3 milliseconds typical
Program Page (i.e Write): 200 microseconds typical (or 0.2 milliseconds)
Data transfer time (i.e Read): 45 microseconds
These are a characteristic of that type of NAND flash, and change by quite. bit from type to type (number layers, if SLC, MLC, TLC, QLC, 1D or 3D etc).
The point to take away, is that this is why a Read, or Write, and Random or Sequential operations are going to be different.
To end this very brief answer to quite a complex question, is what SNIA says:
"The Storage Networking Industry Association – SNIA – determined a few years back that it should address SSDs since they were about to become an important part of most storage systems. To this end SNIA created the Solid State Storage Initiative, or SSSI. They didn’t name it after SSDs
since there will clearly come a time when flash stops pretending it’s an HDD and abandons standard HDD mechanical and interface specifications."
That's very important to understand, especially what I highlited at the end.
SSD is COMPLETELY different from HDD, but a lot of the terminology, concepts and benchmarks from HDD's are still being used on SSD's: not always very successfully.
It's not a complete evil, but you need to be careful, because it can lead you astray.
It's exactly like photography, where modern solid state photography, with a sensor that writes to memory, has replaced film format to most extents.
The ideas of ISO speed, shutter speed, and even the need for an SLR (with a prism etc) are not really directly translatable from film format to solid state photography. And yet for tradition, a lot are still used.
And that's sometimes useful to understand the concepts of photography in general, but can be misleading too.
That's the point that the SNIA is making.
Regards,
Alan
P.S. I wrote this because it was useful to me to put my thoughts down, in terms of helping ME understand things better.
I'm not an SSD expert per se, but I've spent time time looking into them, and the concepts are still fresh to me, and I think I'm aware of the critical things to understand for a newcomer (like myself).
If some thinks there's a drastic mistake, please tell me, and I can revise it.