📜 ⬆️ ⬇️

Backup with Software-defined Storage and Erasure Coding - is the game worth the candle?

As the activity of extortionists, such as Petya or BadRabbit, grows, as well as due to the tightening of legal requirements (for example, No. 187- effective entry “On the Protection of Critical Information Infrastructure”), data volumes for backup are constantly increasing. As a result, the cost of backup storage infrastructure is increasing. Technologies like Erasure Coding can drastically reduce storage costs. Today we will tell you exactly how and how to build a Backup based on Erasure Coding.

image

Reed-Solomon codes, as the most efficient method of storing large amounts of information in software-defined storage systems (software-defined storage - SDS), have already been spoken and written a lot. But backups are one of the ideal scenarios for using Erasure Coding (EC), since a backup is a large file that is written and read in sequence. Despite the increasing prevalence of SDS, they are not so often used to store backups, because SDS defaults to using traditional replication to protect user data, which requires 2 or 3 times more disk space compared to the “pure” amount of information. As a result, this solution is extremely inefficient.

In distributed storage systems, to which our Virtuozzo Storage also belongs, as well as any modern software-defined storage systems, one or two copies are created for each data block, and all of them are hosted on different servers depending on the load, proximity to the data source and other factors affecting performance and fault tolerance. When using Erasure Coding, the data is divided into several blocks, distributed between the cluster nodes. In addition, two or three checksums are created, which makes it possible, like when using replicas, to save data even if two servers or disks fail simultaneously, but at the same time it saves disk space, reducing the redundant capacity several times.
')
For example, if you have a cluster of 5 North, in order to protect yourself from the failure of two of them, you will need to use either 3 replicas in the case of replication, or Erasure Coding according to scheme 3 (block) +2 (hash). Suppose you save 100GB, then your data along with the replicas will take as much as 300GB, and when using EC this capacity will be reduced to about 170GB. And the more servers in your cluster, the more you save space. For example, in the case of a cluster of 20 servers, redundant disk usage will be only about 20%.

image

Yes, in some scenarios the use of Erasure Coding leads to a decrease in application performance, but as it turned out, in the case of backup, the opposite is true - this leads to an increase in the speed of creating a backup. And given that in commercial solutions Erasure Coding is often a paid option, and its performance is still questionable, not everyone decides to try a software-defined storage system for storing backup copies. And we will now show that it is completely in vain.

And yet, what about performance?

We tested backup speeds using Erasure Coding in two configurations - on cluster # 1, consisting of 6 nodes and on cluster # 2, made up of 12 nodes. The application of the Erasure Coding scheme was based on the standard functionality of Virtuozzo Storage, and the server configurations were as follows:

The first cluster, which was launched on 6 nodes, housed 42 hard disks (chunk service), with 7 disks in each server. We used standard SATA drives with a spindle speed of 7200 rpm. For each of them, a log was created on the NVMe SSDs of 32 GB (total 224 GB per server), and the size of the client cache for this cluster was 64 GB for each mount point. We used the built-in solution from Virtuozzo 7 as backup software.

image

The measurement results showed that the bandwidth of such a cluster of 6 nodes for the backup task using Erasure Coding is 1.6 times higher than traditional replication.

image

As the cluster grows, the effect only increases, even if you take more productive hard drives. Thus, cluster # 2 already consisted of 12 nodes, each of which contained 11 high-speed SAS disks with a spindle speed of 15,000 rpm. In this regard, the size of the logs on the NVMe SSDs was reduced (16 GB per chunk service or 176 GB per node). However, the results showed that the bandwidth (and hence the speed) of backup in a cluster was three times higher with EC than with data replication.

Why it happens? In fact, the answer is simple: unlike other, perhaps, more complex tasks, backup is actually a sequential write of data (Sequential write). And in the case of EC, the cluster needs to write less extra data. When using the standard replication scheme with 3 replicas, it is necessary to record information three times (the original block and two copies), and Erasure Coding records only 20% more data than the size of the original file. And the more data flows there are, the more noticeable the effect of using Erasure Coding will be.

Moreover, in distributed storage systems, network interfaces are often the bottleneck. After all, a 1 Gbit / s channel can provide data transfer at a speed of 110-120 MB / s, which approximately corresponds to the capabilities of only one hard disk during sequential writing / reading. Therefore, the use of EC justifies itself as a means of increasing the efficiency of the cluster, reducing the load on the network subsystem in backup scenarios. For storing small amounts of non-highly demanded data, you can use 1 Gb / s network adapters, although for productive loads we certainly recommend 10 Gb / s network adapters.

Use for free

The performance issue has been resolved - Erasure Coding really handles backups faster than replication, while significantly saving disk space, which means server, disk and network port resources. How much is it? In the case of Virtuozzo Storage, you can use Erasure Coding for free - it is included in our standard license. Erasure Coding is just an option when creating a data volume for containers and virtual machines from Virtuozzo, iSCSI, NFS, or object storage. If you are already using Virtuozzo Storage, you can turn on the EC instantly and immediately get all the benefits of using the technology. And if you use Virtuozzo with Virtuozzo Storage, then the backup software itself is already included in your license.

image

As we could see in the examples above, if you need to protect large amounts of data, Erasure Coding helps both to save and reduce the time spent on creating backup copies. If you actively use object storage, for example, Amazon S3-compatible Object Storage, then Erasure Coding becomes even better for this kind of workload. And do not forget, no one has canceled the ability to simultaneously use replication for the hottest data.

Source: https://habr.com/ru/post/347296/


All Articles