SmartFlush™

By | Dec 12, 2022 | All, Technology

The Solid State Drive (SSD) is a type of Non-volatile Memory (NVM) that stores data in its embedded NAND Flash chips. The physical characteristics of NAND Flash mean the access latency of an SSD is much shorter than traditional Hard Disk Drive (HDD). This means the stored data will not be lost even if the power supply is lost or switched off.

 

 

Using cache to improve perceived performance

The NAND Flash industry has advanced rapidly for several years. SSDs are one of the most popular types of storage available globally since their prices have become more competitive with HDDs in speed, capacity, and price. More advanced multi-level cell (MLC) NAND Flash architectures have been proposed, such as 2-bit MLC / 3-bit TLC / 4-bit QLC Flash. But these brand-new technologies reduce costs but do come with some trade-offs.

For example, the latency of accessing MLC Flash is much slower than single-level cell (SLC) Flash. However, users are always on the lookout for better user experiences, and SSD manufacturers try different approaches to enhance the performance of their products.
The concept of the “Cache” is commonly implemented inside SSDs to improve user experiences. After all, the thing users care about the most is the transmission rate between a host (e.g., a Personal Computer) and a storage device (e.g., an SSD) rather than the time it takes for their data to be physically programmed into Flash memory,

A common strategy is to put the received data into memory that programs data faster than the primary storage area (i.e., NAND Flash) when data is first transferred from the Host. The data processing time is shortened significantly even though the data has not yet been programmed into the main storage.

Random Access Memory (RAM) is one of the fastest storage media nowadays, and that is why RAM has often be used to exchange data with Central Processing Unit (CPU). RAM is also very popular for cache implementations, whether Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). When pursuing better user experiences, cache techniques are also widely implemented in current SSD products. With appropriate designs and implementations, consumers experience the advantage of the accessing speed brought by RAM.

 

 

The problem of data loss in RAM Cache

Although RAM can be used as a cache in SSD design, there is still one inherent problem to overcome. While using RAM provides users with attractive data access speed, one trade-off due to the physical characteristic of RAM is volatility; any data stored in RAM is lost once the power supply is gone. If it were possible to reduce, or even eliminate, the risk of data loss in RAM due to the volatility of RAM, it would strengthen the data integrity capability of the SSD. But the adoption of RAM in SSD design indeed brings significant advantages to user experiences.

There are some possible approaches to addressing the issue of caching data integrity. One approach is by only putting recoverable data into the RAM cache. Using DRAM for caching in SSDs is designed to cache “Hot” data that can be recovered from the source data stored in flash. In this way, even if the cached data is corrupted because of sudden power loss, the SSD controller can still rebuild the data according to the existing data in flash.

Unfortunately, not all scenarios can be covered by this approach. Data programmed by users from the host side to the RAM cache of an SSD can be regarded as “Unrecoverable” data. Once power loss occurs, this data is lost. To reduce the risk of losing cached data, Phison developed a proprietary technology called SmartFlush™.

 

PHISON Technology: SmartFlush™

Phison’s proprietary technology, SmartFlush™, is based on one fundamental principle: flush caching data from RAM to flash at appropriate timings. This strategy is straightforward. SmartFlush™ moves cached data from RAM (volatile) to flash (non-volatile) memory before unexpected power loss.

 

The crucial part of this approach is when to flush data from RAM to flash. If data flushing happens too often, an SSD might remain in a busy state even when a host stops sending commands to the device. As a result, an SSD cannot enter sleep mode, meaning that power consumption might be higher than expected. Also, triggering data flushing so frequently can affect the fluency of SSD operations. On the other hand, if this flushing mechanism isn’t triggered often enough, the possibility of caching data loss becomes higher. The balance between the frequency of flushing data from RAM to flash and the fluency of SSD operation is the key.
There are two approaches to the timing of data flushes:

 

      • Timing 1: When the data size in RAM cache is larger than a page in flash. This is a very basic approach. Since flash types commonly used in the SSD market are now page-based programmable, it makes sense that they do not flush cached data to flash until the size of cached data is more than the capacity of one single page in flash.
      • Timing 2: The Host stops sending commands to the device. The primary purpose of SmartFlush™ is to prevent caching data loss. From the users’ viewpoint, this operation should be performed in the background and should not cause any significant effect on general user experiences. Consequently, the moment a Host stops sending requests to the device can be regarded as an appropriate timing.

 

The frequency of launching data flushing should be considered when developing the overall specification of an SSD. The actual implementation of this technology will vary with the hardware design and firmware design in SSD products. How to achieve a perfect balance of the timing of data flushing for different user scenarios in the real world is very complicated, and Phison is good at this tuning.

 

Phison’s SmartFlush™ improves perceived performance while ensuring data integrity

This article only introduces the fundamental concepts of SmartFlush™ instead of working through all the details. In practical cases, SmartFlush™ is implemented with more complex methodologies than listed here, and those methodologies can be different between various Phison flash-based products and diverse user scenarios. But no matter how the implementation methodologies vary, the benefits brought by the SmartFlush™ mechanism are the same. With this intelligent feature offered by Phison, users’ confidence in data integrity can grow to the next level.

 

The Foundation that Accelerates Innovation™

en_USEnglish