Random access, on the other hand, don't have that benefit of predictability. We're talking >5ms just to get to where the requested byte lives, while the actual reading of the byte averages out to about 0.00000625ms per sequential byte read (or 0.003125ms per 512 B block). This typically takes a very very long time, far longer than the actual reading. Both the spinning and the moving arms take physical time to move, and they can't be sped up by much without risking damage. The drive needs to wait for two things: it needs to wait for the arm to move to the right ring ("track") of the disk, and also needs to wait for the disk to spin around so the needed data is under the reading head. This means that at any one time, only the bit of data under the head at the end of the arm can be read. Here is a video of an open HDD where you can see the spinning disks and moving arms. Mechanical HDDs have a very slow seek time because of how they're physically laid out: they consist of a number of heavy metalised disks spinning around, with physical arms moving back and forth to read the disk. Similarly, the drive can read off the physical storage in one go, rather than "seek to 1, read 1,2,3,4, seek to 5, read 5,6,7,8". If you've requested blocks "1, 2, 3, 4", the OS can guess you'll want "5, 6, 7, 8" next, so it tells the drive to read "1, 2, 3, 4, 5, 6, 7, 8" in one go. This is because sequential access lets the operating system and the drive predict what will be needed next, and load up a large chunk in advance. Sequential access is generally faster than random access. But even after dealing with blocks rather than individual bytes, sequential block access is faster than random block access. These blocks are either 512 Bytes or 4096 Bytes big, depending on the drive. In practice, the operating system requests blocks of data from the disk at a time.Ī block is just a range of bytes for example, block #1 might be bytes #1-#512, block #2 might be bytes #513-#1024, etc. Because computers deal with such large sizes (1 MB ~= 1000000 B), even sequential access is inefficient if you have to ask the drive for each individual byte - there's too much chatter. For example, if you're starting lots of programs at once they'll need to read lots of files scattered around your drive.įrom the drive's perspective, it's seeing commands like "read block #56, read block #5463, read block #14, read block #5" Blocks This doesn't have to mean truly random it really means "not sequential". Random access means there's no obvious pattern to the reads or writes. If you're downloading a file, it gets downloaded and written to disk from beginning to end.įrom the disk's perspective, it's seeing commands like "read block #1, read block #2, read block #3, read byte block #4" 1. For example, if you're watching a video, you would load the video from beginning to end. Sequential access means you read or write the file more or less one byte after another. There are, broadly, two different ways you might access a file. In CrystalDiskMark, "Seq" means sequential access while "4K" means random access (in chunks of 4kB at a time, because single bytes would be far too slow and unrealistic 1). What you are running into is typical of mechanical HDDs, and one of the major benefits of SSDs: HDDs have terrible random access performance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |