Using SSDs as a Cache on a NAS: Does it Improve its Performance?

Some high-performance NAS models allow SSDs to be used as system cache memory with the promise of increased performance. In this article we are going to tell you if doing this is worth it or not, in which scenarios, and how much performance you will earn if you decide to do it.

Since the arrival of SSDs on the market, there has been a kind of battle between HDD and SSD, obviously each with its own pros and cons. While a mechanical hard drive is made up of an actuator, a read / write arm, a spindle, and platters on which the data is stored, an SSD has no moving parts and uses flash memory to store the data, consuming less power and without producing noise, vibrations or heat.

Using SSDs as a Cache on a NAS

In addition, as you know SSDs deliver better performance, especially when it comes to high workloads with many read and write requests since to search for each data, the plates must rotate on a mechanical disk and the heads search for the data scattered in the disk in a non-contiguous manner. In an SSD that does not occur, all data is accessed equally and, with this, greatly reduces latency (the time it takes to access the data you are looking for).

And it is precisely latency that has to do with the use of SSDs as cache memory of a NAS.

What does it mean to use SSDs as cache memory of a NAS?

SSDs cache refers to a temporary storage space for frequently accessed data, also known as “active data,” on flash memory chips in an SSD. By reserving a certain portion of storage as a cache where the active data is stored, the system benefits from the low latency of the SSDs, thus being able to respond to read and write requests much faster.

SSD NAS Synology

When running applications that require higher random IOPS or when large amounts of data are written to non-contiguous blocks (such as in a multi-gigabyte database), building a system with only SSDs could cause a hole in the anyone’s pocket. Fortunately, as we said some high-performance NAS have the option of creating a cache of SSDs that serves to create a read and write buffer, thus improving the performance of random access to any data on the NAS.

The SSDs cache on a NAS can be configured in two ways:

  • Read-only cache – When cache is configured this way, only frequently accessed data is stored in it, greatly accelerating random read speeds. Since data writing is not involved here, this data will remain there even if the SSD is corrupted.
  • Read and Write Cache : Compared to read-only cache , this method writes data synchronously to the SSD. To ensure their security, at least two drives are required in RAID 1 to allow fault tolerance, but there is still a risk of data loss if one of the SSDs breaks.

Caché de SSDs

How much performance improves? Is it worth doing?

We already tell you that, since large sequential read and write operations do not benefit much from having cached storage, if you use the NAS primarily as a multimedia server you will not notice any difference. It is when using random (or non-sequential) read and write operations that having a cache of SSDs makes a difference, and the performance improvement can be up to 50% less in terms of latency .

In other words, you are going to benefit from using this system if you use the NAS as a database server, web server, or in general almost any type of file server and especially when these files are either very small or very large ( like a database, which is the example we put before). If you use it to store and watch your movies, since that data is written and read sequentially, having SSDs cache will not make any changes.

In addition you must take into account one more thing, and that is that the larger the cache of SSDs, the more amount of RAM the NAS will need the system to be able to work with it. Based on the data Synology provides regarding this system, approximately 416 KB of system memory is required for each GB of SSD cache . It is not much, but if you put two 256 GB SSDs in RAID1 for a read and write cache, that would already be consuming you about 213 MB of RAM, and if your NAS only has 512 MB of RAM, well imagine the memory portion It will be consuming to keep this system active.

In summary: if you have a very modern NAS with a lot of RAM, and if you use it as a database server or other complex applications, you can notice a performance improvement of up to 50% in latencies. If you have a home NAS to store your backups and / or as a multimedia server, then it is not worth it because you will not notice the difference in performance.