SSD 4K Random Read Slower Than Write: Simple Explanation

The read and write operations of an SSD are often described as cache read and cache write, meaning the SSD interacts with a cache first before dealing directly with the NAND flash storage.

Imagine this: you ask your dad for some money. He usually keeps a small amount of cash in his pocket. If the amount you ask for matches what he has in his pocket, he gives it to you quickly—that’s fast. But if he doesn’t have it, he needs to go to the drawer to get more money, which takes longer. Similarly, when you give him money, he stores it in his pocket first and moves it to the drawer later when he has time.

In the case of sequential reads and writes, the SSD’s behavior is predictable. For example, you ask your dad for $1, and he gives it to you immediately because he has it. He then anticipates that you’ll ask for $5, so he takes $5 from the drawer in advance. Sure enough, you ask for $5, and he gives it to you right away. He then guesses that you’ll need $10 next, so he grabs $10 from the drawer and is ready. The whole process feels smooth and fast. The same logic applies when storing money—since the requests are predictable, the SSD can manage them efficiently.

Because NAND flash typically has faster read speeds than write speeds, reading sequential data from an SSD is usually faster than writing.

Now, let’s switch to random reads and writes, where the situation becomes more unpredictable. Suppose you ask your dad for $1, and he gives it to you quickly. He then grabs $5 in advance, expecting you might want that. But you ask for $50 instead. Now he has to go back to the drawer to get $50. Next, he prepares $100, thinking you’ll ask for more, but instead, you ask for just $1 again. He has to go back to the drawer repeatedly, unsure of your requests, which slows down the process. This randomness leads to inefficiencies, so random reads feel slower.

When writing, the process is a bit more efficient. You give your dad some money, and he stores it in his pocket before moving it to the drawer. However, if the amounts you give him vary each time, he needs to spend a little extra time organizing the money in the drawer.

This analogy provides a simple, qualitative explanation, but the real situation is far more complex. Several layers of caching are involved in managing SSD performance, including:

  1. Operating System File System Cache: This tries to keep related blocks of data together and includes page cache and buffer cache.
  2. Hardware Driver Cache: Buffers read and write operations to optimize performance.
  3. Controller Cache: The SSD’s controller (which varies by manufacturer) has its own cache to handle operations efficiently.
  4. NAND Cache: NAND flash memory itself has built-in cache functionality, and cache read/write is a fundamental feature of NAND flash technology.

Each of these caches plays a role in speeding up SSD performance, but the exact implementation can vary greatly across different systems and manufacturers, making the process intricate and dependent on numerous factors.

Related:

  1. How SSD Technology Powers Intelligent Security Systems?
End-of-Yunze-blog

Disclaimer:

  1. This channel does not make any representations or warranties regarding the availability, accuracy, timeliness, effectiveness, or completeness of any information posted. It hereby disclaims any liability or consequences arising from the use of the information.
  2. This channel is non-commercial and non-profit. The re-posted content does not signify endorsement of its views or responsibility for its authenticity. It does not intend to constitute any other guidance. This channel is not liable for any inaccuracies or errors in the re-posted or published information, directly or indirectly.
  3. Some data, materials, text, images, etc., used in this channel are sourced from the internet, and all reposts are duly credited to their sources. If you discover any work that infringes on your intellectual property rights or personal legal interests, please contact us, and we will promptly modify or remove it.

Leave a Reply