SSD Cache
SSD cache improves the performance of random access by storing frequently accessed small files (randomly placed small blocks of data) on the SSDs of an SSD cache mounted on a volume or LUN.
The objective of enabling SSD cache is to increase the performance of random access to a small portion of data that is frequently accessed in the storage space. For example, both large sequential read or write operations (e.g., HD video streaming) and entirely random data reading patterns lack re-reading patterns, and thus will not benefit significantly from SSD caching. For general applications, it is recommended to enable the Skip sequential I/O option, so that sequential I/O can still pass through to the drives of the storage space.
Note:
- SSD cache is available on specific models only. To see if your model supports SSD cache, please refer to this article.
- We recommend using drives on the Synology Products Compatibility List to prevent any compatibility issues. Using incompatible drives may lower the system performance and even cause data loss.
- Please refer to the product specifications of your models on Synology's website for the maximum size of SSD cache allowed on your DiskStation.
SSD Cache Types
There are two types of SSD cache, both implementing an LRU (Least Recently Used) algorithm to swap the data in the cache:
- Read-only cache can consist of 1 to 12 SSDs and be set to the cache RAID type of RAID 0 to improve the random read performance of the storage space on which it is mounted.
- Read-write cache can consist of 2 to 12 SSDs and be set to the cache RAID type of RAID 1, RAID 5, or RAID 6 to improve the random read and write performance of the storage space on which it is mounted.
Note:
- SSD read-only cache stores copies of data from the volume; thus, no data loss will occur even if the read-only cache has crashed.
- When SSD read-write cache is degraded, Automatic protection mechanism will be activated. It will stop caching new IOs and start writing (i.e., synchronizing) existing new data from the SSDs to HDDs. After the data synchronization is completed, no data loss will occur even if the read-write cache has crashed.
- In normal situations, SSD read-write cache contains new data that has not been synchronized to HDDs yet. Please do not remove SSDs from your Synology NAS (even with the system powered off) before you remove the cache from Storage Manager. Otherwise, the volume may crash.
Memory Requirements
SSD caches require a certain amount of system memory. The larger the allocated cache capacity, the more system memory is required. However, to maintain the stability of DiskStation, only a quarter of the pre-installed system memory can be used for SSD cache. If you want to create an SSD cache of a larger capacity, you might need to upgrade the memory of your DiskStation.
Note:
- The maximum cache size is limited to 930 GB for DiskStation models with an Alpine CPU. To find out what kind of CPU is used in your DiskStation, please refer to this article.
Every 1 GB of SSD cache requires approximately 416 KB of system memory (expandable memory can be counted). Therefore, if a read-only cache uses RAID 0 and its configuration is 2 x 128 GB SSD, the total cache size will be 256 GB and require at least 104 MB of memory; if a read-write cache uses RAID 1 and its configuration is 2 x 128 GB SSD, the total cache size will be 128 GB and require at least 52 MB of memory. If the memory is insufficient, SSD cache creation will be restricted or the size of SSD cache will be limited.
Note:
- The above does not apply to read-write SSD caches created in DSM 5.1 or earlier versions. Every 1 GB of SSD cache created before DSM 5.2 will still require 4 MB of system memory even when used in a DSM 5.2 environment.
Cache Hit Rate
A SSD cache by default only accelerates random I/O and does not accelerate sequential I/O. The Cache Hit Rate of a SSD cache can be calculated according to the following formula:
- Hit Rate of a SSD read-only cache = Accelerated Random Read Counts / Total Random Read Counts * 100%
- Hit Rate of a SSD read-write cache = Accelerated Random Read & Write Counts / Total Random Read & Write Counts * 100%
Managing SSD Cache
To create and mount an SSD cache:
- Install the SSDs into your DiskStation. Please see the notes above first.
- Go to Storage Manager > SSD Cache. Click Create.
- Select the cache mode (only available for DiskStation models that support read-write cache).
- Select the volume or LUN on which you want to mount the SSD cache from the drop-down menu.
- Select the SSDs from the list. All data on the SSDs will be erased. Please make sure there are no important data on the SSDs.
- Click Apply.
To stop caching sequential I/O:
If your target volume or LUN has excellent sequential I/O performance, you can make SSD cache stop caching sequential I/O and access data directly from your drives for higher speed and better performance.
- Click Configure to open the configuration window.
- Tick Skip sequential I/O.
To remove an SSD cache:
- Click Remove to permanently remove this SSD cache from DiskStation.
Note:
- For the read-write cache, you must remove it through this procedure (even if your DiskStation is powered off), otherwise volume crash will occur because some data still reside only on the cache.
- When mounting or removing SSD cache, the system will stop all related services (e.g., shared folders, installed packages, and current connections)
- If a read-write cache on a storage space is not detected when starting up, the system will not mount that storage space. Please find and re-install the SSDs in the DiskStation and reboot to mount the storage space.
- Please make sure to properly remove the read-write SSD cache before removing its corresponding SSDs. Removing the SSDs improperly (e.g., when a cache is still in use or when the system is powered off) will cause the data stored in the target volume or LUN to crash.
To cancel the removal of an SSD cache:
- Click Cancel Removal to cancel the removal process.
To repair an SSD cache:
- For a read-write cache: If one of the SSDs has crashed, please follow the steps below to repair it.
- Replace the defective SSD with a new one. (The new SSD must be larger than or equal to the size of the original SSD.)
- Click the Repair button.
- Select the SSD from the list.
- Click Apply.
- For a read-only cache: If one of the SSDs has crashed, please remove the cache and replace the defective SSD. Then click Create to make a new cache configuration.
SSD Cache Advisor
This feature allows you to calculate and view the total size and number of recently accessed files on a specific volume. If you have not yet created any SSD cache on the selected volume, this information can be useful when evaluating how much SSD cache capacity is suitable for your system. If you have previously created an SSD cache on the selected volume, the analysis and usage of the cache will also be shown here.
To run SSD Cache Advisor:
- Click SSD Cache Advisor to launch the wizard.
- Select a volume for calculation, and then click Next.
- The wizard will automatically begin totaling the size and number of recently accessed files on the selected volume. Calculation time varies depending on your individual environment.