Is SSD read faster than write?

SSDs or solid-state drives have become increasingly popular in recent years as a storage solution that offers faster read and write speeds compared to traditional hard disk drives. Many wonder if SSDs have asymmetric read and write performance – specifically, is reading from an SSD actually faster than writing to it? The short answer is yes, SSD reads are generally faster than writes due to technical limitations in how SSDs handle data. However, the performance difference between read and write speeds depends on several factors.

How SSDs Work

To understand why reads are faster than writes on an SSD, it helps to first understand how SSDs work and store data differently than hard drives. An SSD has no moving parts and instead stores data in NAND flash memory chips made up of floating gate transistors. These transistors can hold an electrical charge to represent binary 1s and 0s for data storage. Reading the charge state allows the SSD controller to determine if a bit is a 1 or 0.

Writing data to an SSD involves applying a charge to set transistors to the appropriate state. Erasing data involves discharging the transistors back to an empty state so new data can be written. Erasing must happen at the block level, where a block contains a large number of transistors.

This erase-before-write process causes a key performance difference versus hard drives. When writing to a hard drive, new data can directly overwrite existing data. But an SSD must first erase an entire block before writing new data to any part of that block. This extra step means write performance depends largely on the efficiency of the erase process.

Page and Block Structure

SSD storage is organized hierarchically into pages and blocks. A page is the smallest unit that can be read or written – usually between 2KB and 16KB. Pages make up blocks, which are the smallest unit that can be erased – usually between 128KB and 2MB.

When writing data, smaller writes can occur at the page level while an entire block must be erased for larger writes. The SSD controller writes data to pages in a block until it is full, then erases the entire block before writing pages again. This process causes write amplification – significantly more data is written than requested due to this erase-write cycle.

Garbage Collection

Because SSDs can only write to an erased block, they eventually run into a problem where there are no fully erased blocks available. This is where the SSD controller runs garbage collection in the background to consolidate data and free up space.

Garbage collection involves relocating any valid pages with data to new blocks and erasing old blocks to make them available again. This requires both reading valid pages and writing them to new locations. Garbage collection running in the background can interfere with foreground read and write performance.

Wear Leveling

Wear leveling is another process the SSD controller handles in the background. SSD blocks can only endure a limited number of erase cycles before wearing out. To extend the lifespan of the drive, wear leveling distributes writes across blocks so erasures are evenly spread out.

Wear leveling requires data to be relocated frequently between blocks. This constant rearrangement of data also requires both read and write operations, which can further contribute to performance differences between reads and writes.

reads

With this background on how SSDs function, the main reasons reading data is faster than writing become clearer:

  • Reads simply detect the charged state of transistors to determine 1s and 0s. No charge needs to be applied or removed.
  • No erase cycle is required before reading pages in a block.
  • No write amplification occurs when reading data.
  • Garbage collection and wear leveling overhead impact writes much more than reads.

Essentially, the SSD controller does not need to modify data in any way when reading. Reads involve simpler electronics and less management overhead than writes.

writes

Writes require more operations and overhead:

  • Applying a charge/discharge cycles transistors to set their state.
  • An entire block must be erased before writing pages within it.
  • Write amplification leads to writing more data than requested.
  • Garbage collection is triggered more frequently during writes.
  • Wear leveling requires data to be relocated while writing.

The combined latency of erasing blocks, write amplification, garbage collection, and wear leveling all contribute to slower write speeds compared to reads.

Other Factors Affecting Speed

While the inner workings of SSDs cause reads to generally be faster than writes, there are other factors that affect performance as well:

  • Controller architecture – More channels and cores allow parallelization of reads and writes to improve speeds.
  • Over-provisioning – Keeping free space allows less frequent garbage collection and wear leveling.
  • DRAM cache – An SSD cache improves read/write speed by caching mapping tables and frequently accessed data.
  • File system – Some file systems are optimized to reduce write amplification and fragmentation on SSDs.
  • TRIM – TRIM commands let SSDs know which deleted blocks can be erased and reused ahead of time.
  • Encryption – Full disk encryption requires additional CPU processing that can reduce performance.
  • Drive capacity – Higher capacity SSDs spread wear more thinly so garbage collection is less frequent.

Factors like these can minimize or widen the gap between SSD read and write speeds in practice. However, the inherent nature of SSD storage tends to make reads faster regardless.

Benchmarking Reads vs Writes

Synthetic benchmarks provide a method to quantify the difference between SSD read and write performance. As an example, the CrystalDiskMark storage benchmark measures sequential and random reads/writes in megabytes per second (MBps).

Here are sample benchmark results from a SATA SSD:

Benchmark Read Speed Write Speed
Sequential Q32T1 550 MBps 520 MBps
4K Q8T8 Random 200 MBps 110 MBps

This shows reads about 5-10% faster for sequential transfers, but over 80% faster for small random I/O. Results vary across SSD models, but most exhibit an advantage for reads in these synthetic benchmarks.

Real-World Usage

While synthetic benchmarks provide measurements useful for drive comparisons, real-world usage often shows smaller differences between read and write speeds in SSDs. Application performance relies heavily on reads during most typical consumer and office workloads.

Activities like booting an OS, launching programs, opening files, and browsing websites depend primarily on read performance. Writes occur less frequently in smaller bursts for checkpoints, file updates, etc.

For example, copying a single large file to an SSD may achieve 400 MBps writes. But system operations like installing software or updating files occur as a collection of small random writes averaging 50-100 MBps. Data-intensive workloads like video editing will also write in a more random pattern.

SSD caching and the Linux page cache help minimize the impact of these random writes. By coalescing multiple small writes into a single larger sequential write, the performance gap to reads decreases significantly.

For typical desktop/laptop use and most workstation workloads, the SSD write speeds are sufficient to provide an excellent overall user experience. So while measurable differences exist between reads and writes, they are less noticeable during general usage.

Workloads Optimized for Reads

There are some scenarios where SSD read speed provides a significant advantage over writes:

  • Booting and loading: The boot process and launching apps rely heavily on reads. Faster reads directly speed up the experience.
  • Large file transfers: Copying multi-gigabyte files between SSDs can reach read speeds not attainable by writes.
  • Game load times: Games load textures, maps, and data through sequential reads. SSD reads improve load time over HDDs.
  • Media playback/editing: Video playback and photo editing rely more on high read bandwidth to access large media files.
  • Database queries: Read-heavy databases can query and analyze datasets much faster from SSDs.

Any use case dominated by large, sustained reads rather than small, random writes can benefit from prioritizing the higher read performance of SSDs.

Workloads Optimized for Writes

There are scenarios where write speeds are critical and slower SSD writes could bottleneck performance:

  • Big data analytics: Analytics on huge datasets generate intensive random writes that SSDs handle poorly compared to reads.
  • Video recording: Constant video recording to disk consumes high sustained write bandwidth beyond most SSDs.
  • Database transactions: High frequency inserts/updates to databases with many small writes will be limited by SSD write speeds.
  • Virtualization: Multiple VMs with actively changing data will thrash SSDs with excessive writes.
  • Data ingest: Applications ingesting sensor data, logs, etc. at high sustained rates depend more on write performance.

These write-centric workloads perform best with enterprise SSDs optimized for write durability and speed rather than consumer SSDs. Applications bottlenecked by writes should consider datasets and access patterns when evaluating SSD performance.

Conclusion

SSD reads outpace writes because reading data is physically simpler than erasing and writing in flash memory. However, modern SSDs have improved algorithms and parallelism to minimize the performance gap between reads and writes.

For typical consumer workloads, SSD performance differences are less noticeable. But applications dominated by either reads or writes can benefit by understanding asymmetric SSD performance. When evaluating SSDs, check benchmarks for both sequential and random read/write speeds.

In the future, new memory technologies like 3D XPoint may provide symmetric read and write latency. But for now, the structure of NAND flash continues to make SSD reads faster than writes.