StarWind Virtual SAN L1 and L2 caches. Operational principles
StarWind uses conventional RAM as a write buffer and L1 cache to adsorb writes, while flash memory serves as a L2 cache, and implements both caches using the same algorithms (shared library). Old data is displaced using LRU algorithm: least recently used. The cache policy is indicated along with the other parameters while the cache is being created. In V8R5 (StarWind Version 8 Release 5) the cache mode can be changed on the fly for the already existing devices.
- writes data initially to the cache and confirms the I/O back to the host immediately;
boosts performance in the following cases:
- load fluctuations: the data is written to the cache during the load spikes and gradually copied to the main storage when the workload goes down;
- continuous rewriting of the same blocks: blocks are rewritten only in memory and several writes to the cache correspond to only one disk write.
- boosts only read operations;
- the data is cached when being read from the disk;
- the data will not be lost if the server or the cache failure occurs before all the data is de-staged to the backing store;
- is the default mode (and the only mode) for the L2 cache;
- cached data does not need to be offloaded to the backing store when device is removed or the service is stopped.
L1 cache in WB mode:
- smoothens the slight mix up with sequential write requests, which occurs when the HA implements the round robin approach;
- L1 unifies sequential small write requests into larger requests (write coalescing);
- compensates overwrites of the same disk locations;
- implements in-memory caching of the working data set that boosts performance due to the ratio of the working data set size to the cache size.
L2 cache in WT mode:
- accelerates the read operations;
- comes in handy when the main storage is based on spindle drives, while the L2 cache resides on a SSD;
- is very effective in case the working data set fully fits the L2 cache size.