In articles about the storage system from the “administrator's notes”, the technologies of software organization of the disk array were practically not considered. In addition, a whole layer of relatively cheap scenarios for accelerating storage using solid-state disks remained behind the scenes.
Therefore, in this article I will consider three quite good options for using SSD disks to speed up the storage subsystem.
Most often, solid-state drives are considered simply as an alternative to HDD, with more bandwidth and IOPS. However, such a head-on replacement often costs too much (HP branded disks, for example, cost as low as $ 2,000), and the usual SAS drives are returned to the project. Alternatively, fast disks are simply used dotted.
In particular, the use of an SSD for a system partition or for a database partition is convenient. You can read the specific performance gains in the corresponding materials . From the same comparisons, it can be seen that when using conventional HDDs, the bottleneck is disk performance, and in the case of SSDs, the interface will be holding back. Therefore, replacing a single disk will not always give the same return as a comprehensive upgrade.
The servers use SSD with SATA interface, or more productive SAS and PCI-E. The majority of server-side SSD with SAS interface on the market are sold under the HP, Dell and IBM brands. By the way, even in branded servers, you can use OEM drives Toshiba, HGST (Hitachi) and others that allow you to make the upgrade as cheap as possible with similar characteristics.
With the widespread use of SSD, a separate protocol for accessing disks connected to the PCI-E bus — NVM Express (NVMe) was developed. The protocol was developed from scratch and considerably exceeds the usual SCSI and AHCI with its capabilities. Solid state drives with PCI-E, U.2 (SFF-8639) interfaces and some M.2, which are more than twice faster than conventional SSDs, usually work with NVMe. The technology is relatively new, but over time it will definitely take its place in the fastest disk systems.
When selecting SATA solid-state drives, you should pay attention to the DWPD parameter, which determines the durability of the drive. DWPD (Drive Writes Per Day) is the permissible number of rewriting cycles of the entire disk per day during the warranty period. Sometimes there is an alternative characteristic of TBW / PBW (TeraBytes Written, PetaBytes Written) - this is the declared volume of recording on the disc during the warranty period. In SSD for home use, the DWPD indicator can be less than one, in the so-called "server" SSD - 10 or more.
Such a difference arises due to different types of memory:
SLC NAND . The simplest type - one bit of information is stored in each memory cell. Therefore, these drives are reliable and have good performance. But you have to use more memory cells, which negatively affects the cost;
MLC NAND . Each cell already contains two bits of information - the most popular type of memory.
eMLC NAND . The same as MLC, but increased resistance to rewriting due to more expensive and high-quality chips.
Thus, when spot-replacing conventional drives with solid-state drives, it makes sense to use MLC models in RAID 1, which will give excellent speed with the same level of reliability.
Using RAID with an SSD is not a good idea. The theory is based on the fact that SSDs in a RAID wear out synchronously and at some point all disks can fail at once, especially when rebuild an array. However, the situation with HDD is exactly the same. Unless, damaged blocks of a magnetic surface will not even allow to read information, unlike SSD.
Still, the high cost of solid-state drives makes you think about their alternative use, in addition to the point replacement or use of data storage systems based on SSD alone.
The size of the array as a whole depends on the size and speed of the RAID controller cache. You can expand this cache using SSD. The technology resembles Intel's Smart Response solution.
When using such a cache, data that is used more often is stored on cache SSDs, from which reading or further writing to a regular HDD is made. There are usually two modes of operation, similar to the usual RAID: write-back and write-through.
In the case of write-through, only reading is accelerated, and in the case of write-back, reading and writing are accelerated.
When setting the write-through cache, the recording is performed both in the cache and on the main array. This does not affect write operations, but speeds up reading. In addition, power outages or the entire system for data integrity is not so bad;
Work usually requires a special license or hardware key. Here are the specific names of the technology among popular manufacturers:
LSI (Broadcom) MegaRAID CacheCade. Allows you to use up to 32 SSDs under the cache, with a total size of no more than 512 GB, RAID is supported from caching drives. There are several types of hardware and software keys, the cost is about 20 000 r;
Microsemi Adaptec MaxCache. Allows you to use up to 8 SSDs in cache in any RAID configuration. You do not need to buy a separate license, the cache is supported in the Q series adapters;
The operation scheme of the SSD cache is extremely simple - frequently used data is moved or copied to the SSD for quick access, while less popular information remains on the HDD. As a result, the speed with repetitive data increases significantly.
To illustrate the operation of the SSD-based RAID cache, the following graphs can be given:
StorageReview is a comparison of the performance of different arrays when working with a database: regular disks and their alternative based on LSI CacheCade are used.
But if there is a hardware implementation, then surely there is a software equivalent for less money.
In addition to software RAID, there is also a software SSD cache. In Windows Server 2012, an interesting technology Storage Spaces, which allows you to collect RAID-arrays from any available drives. Drives are combined into pools, on which data volumes are already placed - the scheme resembles most hardware storage systems. From the useful features of Storage Spaces can be distinguished storage storage (Tiers) and write cache (write-back cache).
Storage Tiers allows you to create a single pool of HDD and SSD, where more popular data is stored on the SSD. The recommended ratio of SSD to HDD is 1: 4-1: 6. When designing, it is worth considering the possibility of mirroring or parity (analogs of RAID-1 and RAID-5), since each part of the mirror should have the same number of regular disks and SSD.
The write cache in Storage Spaces is no different from the usual write-back in RAID arrays. Only here the necessary volume "bites off" from the SSD and the default is one gigabyte.
The general scheme of work is as follows:
When writing to a blank disc, the data is stored on the SSD;
When the SSD is full, the data is written to the write-back cache, which is written to the HDD;
If the cache is full, recording is done directly to the HDD;
If you consider other operating systems, the technology is available even more. For example, GNU \ Linux has bcache , EnhanceIO , dm-cache and lvmcache , L2ARC in ZFS, Cache Tiering and Cache Poo l in Cephs.
If we talk about software acceleration of the disk system, then an interesting option is the use of RAM for this purpose. There are a number of applications that allow you to "bite off" part of the RAM under the cache - for example, PrimoCache . Such solutions, in addition to speeding up work, will help extend the life of the SSD. The main thing is to provide protection from power problems and not to place too important data in such sections.
File and web servers work well with a cache on the SSD, and for placing the production database, the RAID array from regular disks is better than the data and the separate SSD mirror for transaction logs. The remaining data scenarios require more creative approach and knowledge of the specifics of use.
If you have your own techniques for the proper use of solid-state drives - share in the comments to supplement the examples from the article.
At the same time, tell us what you think about RAM disks - is this just for fun technology, in your opinion?
Source: https://habr.com/ru/post/319214/
All Articles