SSD caching, also known as flash caching or flash memory caching, is the temporary storage of frequently-accessed data on NAND flash memory chips in a solid-state drive (SSD) to improve the drive's input/output (I/O) performance and allow data requests to be met with improved speed. Data that is frequently accessed is stored in a fast SSD cache to reduce latency, shorten load times and improve IOPS performance.
In a common scenario, a computer system stores a temporary copy of the most active data in the SSD cache and a permanent copy of the data on a hard disk drive (HDD). Using an SSD cache with slower HDDs can improve data access times.
How SSD caching works
Host software or a storage controller determines the data that will be cached. An SSD cache is secondary to dynamic random access memory (DRAM), non-volatile DRAM (NVRAM) and RAM-based caches implemented in a computer system. Unlike the primary cache where the data goes through the cache for each I/O operation, the SSD cache is only used if caching the data in it can improve overall system performance.
Once the SSD cache is set up, data gets stored in the low-latency SSD to allow for faster data access later. If the same data -- known as hot data or active data -- is required later, the computer will read the cached data from the SSD instead of from the slower storage media. Storing hot data on the SSD reduces latency and improves data access speed.
When a data request is made, the system queries the SSD cache after each DRAM-, NVRAM- or RAM-based cache miss. If the data is available in the SSD cache, it is known as a cache hit. The request goes to the primary storage system if the SSD cache does not have a copy of the data or if the data cannot be read from the SSD cache. When this situation occurs, known as a cache miss, the system has to access the required data from the original, slower storage media.
This is the sequence of events when data is accessed from the SSD cache:
The computer checks the DRAM cache for the required data.
If it finds the data, it accesses it.
If it doesn't find the data in the DRAM, it checks the SSD cache.
If it doesn't find the data in the SSD cache, it gets it from the persistent storage media.
Frequently-accessed data is copied to the SSD cache to allow for fast access later.