1 Introduction

Recent years have seen increased application of big data in various fields and the popularization of the idea of seeking value in data. For instance, Facebook now processes 350 million pictures, 4.5 billion “likes” and 10 billion messages every single day from its 1.4 billion users, and the hard drive space on its Hadoop (HDFS) cluster exceeds 100 PB, which generates the advertising revenue of 12 billion US dollars each year. How to cost-effectively store and process the big data at PB and EB magnitudes has become a huge challenge.

Hard disk has become a major storage medium for the large-scale storage system, while redundant array of independent disks (RAID) has realized the parallel working of multiple disks through disk striping to improve the performance, volume and reliability of the storage system [4, 5, 12, 18]. However, the parallel working of large quantities of disks also bring with it the problem of high energy costs. Previous studies show that the energy consumed by disk storage system accounts for over 27% of the total energy consumption of data center [19]. The high energy costs not only add to energy consumption costs, but also pose great danger to reliability.

In fact, some storage systems (video surveillance, etc.) with workload based on sequential data storage require massive storage space, but the demand for performance is not high [24]. Under these circumstances, all disks of RAID still remain active and run at their full capacity, bringing the high energy consumption to the storage system [7, 33].

On the other hand, though well known for its low energy consumption and excellent read and write performance, SSD has stayed out of the order list of storage vendors due to its high price/volume ratio for a long time [11]. With the improvement of the manufacturing technologies, SSD has seen its unit prices falling continuously and its gradual adoption in large-scale storage systems. The storage plan of the data centers has gradually developed in the direction of SSD + HDD.

Our contributions are as follows. In consideration of the workload characteristics of sequential data storage, we present EPS-RAID (Extra-Parity S-RAID) architecture to process the random read/write operations by adding a parity disk and an SSD to S-RAID. Using SSD to cache the parity data with RS code [14, 20, 21] and delaying writing random write into disk arrays, so greater disk idle time will be achieved. By testing several main file systems including EXT4, NTFS and NILFS, it has been found that the energy consumption generally drop by over 20% under the premise of ensuring write performance.

2 Related works

Surveillance video grows exponentially and becomes real big data. The research scope of surveillance video is very broad, including surveillance video processing, video transmission and video storage, etc. [17, 22, 25]. Saeid et al. presents temporal profile method that samples critical locations in the video frames to search long surveillance quickly [3]. Alsmirat M A. et al. designs evaluation frameworks for automated wireless video surveillance system [1, 23]. [6] points out that high bandwidth demand and the large storage requirements are the main challenges in video surveillance system. Based on this, Alsmirat M A. et al. designs a reliable IoT-based wireless video surveillance system that provides an optimal bandwidth distribution and allocation to minimize the overall surveillance video distortion [2]. In addition, with the scale enlargement of surveillance video storage, multiview video coding, feature analysis and conservation of surveillance video have also become focuses [16, 30].

The expansion of surveillance video requires large capacity storage devices and that bring high energy consumption. So, energy saving research of surveillance video storage system has remained a hotspot of research and certain key results have been achieved. The current researches are mainly centered on two levels: physical device level and system level. The physical device level is not of much help for large scale data storage system as it fails to consider the energy consumption and data security of the whole storage system. The system level energy saving research on the storage system is the major direction of research, and its major way to lower energy consumption is to reduce the number of working disks consuming energy in the storage system, and realized the maximum energy saving under the condition of guaranteeing the performance and reliability.

Weddle et al. propose a Gear-Shifting Power-Aware RAID (PARAID) which constructs sub-RAIDs containing different number of disks within RAID5, dynamically adjusts the number of working disks according to the different loads of the system to achieve the maximal energy saving while guaranteeing performance and reliability [31]. PARAID is typically applied for Web applications. Its defect lies in its insufficient utilization of the disk space as PARAID has to store multiple mirrors of the same data in the sub-RAIDs of different levels at the cost of large amount of storage space. In addition, PARAID requires data synchronization when switching between different sub-RAIDs, and brings negative impact on the performance of the storage system.

Pergamum [26], targets at the archive system, adds a NVRAM and a low performance CPU in each storage node to form a tome unit. Storing data items, data signature and timestamp etc. as the metadata in NVRAM, Pergamum enables some random I/Os to be implemented when the disks are in standby mode. However, the complex structure of Pergamum increases the overall cost of the storage system.

Mao et al. propose a Green RAID (GRAID) to expand the RAID10 of data mirroring and achieve the energy saving by adding a log disk, periodically updating the data on the mirrored disks and shutting down all mirrored disks during the interval between two data updating [13].

Wang et al. propose an eRAID model which uses the redundancy trait of RAID1 to redirect I/O requests, and reduce the energy consumption by shutting down all or partial redundant grouping of disks [29].

Li et al. propose S-RAID [7, 8] which is mainly adopted for sequential write-dominated application system, and reach energy conservation effects by shutting down some idle disks under the premise of meeting the performance requirements of the storage system. Under the ideal state, there is only one grouping of disks remaining working and other groupings of disks remaining in shutdown or in standby mode. S-RAID has a good energy efficient effect compared with the traditional RAID layout. However in reality, the random I/Os, e.g. superblocks and metadata, has resulted in frequent startup of standby disk groupings, leading to degraded performance and extra energy consumption.

Liu et al. propose HS-RAID [10], which made certain energy efficient optimization on S-RAID with NILFS. However, limited by the small volume and erased times of SSD, this scheme is not apply to mainstream file system, as EXT4, NTFS, etc.

DPPDL [28] dynamically allocates the storage space with appropriate degree (number of disks) of partial parallelism according to performance requirement. DPPDL achieves 19% and 56% of the energy saving effect compared with S-RAID and eRAID, but the disk control strategy is too complicated.

3 Brief introduction to S-RAID and data analysis

3.1 Data layout of S-RAID

The S-RAID contains two redundancy strategies: S-RAID4 redundancy strategy and S-RAID5 redundancy strategy, which are similar to the redundancy strategies of RAID4 and RAID5 respectively, and the difference lies in whether the parity data is fixed in one disk or decentralized in different disks. Only the S-RAID5 architecture consisting of 5 disks (4D + 1P) is introduced here.

Figure 1 shows data layout of S-RAID5 consisting of 4 data disks (divided into 2 groupings: G 0 and G 1 ) and 1 parity disk. S-RAID5 has 10 stripes ranging from Stripe 0 to Stripe 9 with the parity data decentralized evenly on 5 disks. Each stripe grouping (VGroup) contains 2 stripes with the P parity disk fixed, equal to an S-RAID4 architecture. Stripe grouping strategy can ensure the good parallelism and lower the startup and shutdown frequency of the disks. In S-RAID5, parity data are evenly distributed and the startup and shutdown frequency of the disks is higher than S-RAID4, but it effectively avoid the bottleneck of parity disk of S-RAID4, leading to levels of higher performance and reliability over S-RAID4.

Fig. 1
figure 1

Data layout of S-RAID5

The logical block address (LBA) are arranged along the direction of the arrows and next to each other, as in Fig. 1. Therefore, when the system I/O is dominated by sequential data write, the I/O requests of the storage system will concentrate on the same grouping of disks within a certain period of time and other disks will remain free, thus lowering the energy consumption of the whole storage system. In addition, the write operations in S-RAID are all small-write. When the write request comes, the data block and parity block on the same stripes of the disks will be read, S-RAID will recalculated the parity block data and write the new data and calculated parity data into corresponding disk. The recalculation of the parity block is as formula (1).

$$ {P}^{\prime }= P\underset{D_i\in {G}_k}{\oplus}\left({D}_i\oplus {D}_i^{\prime}\right)= P\oplus {D}_q\oplus {D}_q^{\prime}\oplus \cdots \oplus {D}_{q+{N}_G-1}\oplus {D}_{q+{N}_G-1}^{\prime } $$
(1)

Where ⊕ indicates exclusive OR operation, D i indicates the old data on data disk D i , D’ i indicates the new data on data disk D i , N G is the number of disks in the grouping G k , D q is the first disk in the grouping G k , i.e. q = k* N G . It can be represented in formula (2) in the stripe form:

$$ S{P}_s^{\prime }= S{P}_s\underset{S_{i, s}\in {G}_k}{\oplus}\left({S}_{i, s}\oplus {S}_{i, s}^{\prime}\right)= S{P}_s\oplus {S}_{q, s}\oplus {S}_{q, s}^{\prime}\oplus \cdots \oplus {S}_{q+{N}_G-1, s}\oplus {S}_{q+{N}_G-1, s}^{\prime } $$
(2)

Where S i,s indicates the old data and S’ i,s indicates the new data.

3.2 Data characteristics of read/write operations of S-RAID

3.2.1 NTFS-based read/write operation characteristics

NTFS is the standard file system launched by Microsoft after Windows NT and the following Windows file systems. In this experiment, NTFS is arranged for S-RAID5 and data is sequentially written into disk groupings by the analog data generator [7]. Figure 2(a), (b) and (c) are the characteristics at the initial 10 min, 1 h and 5 h respectively triggered by the first time to write.

Fig. 2
figure 2

Data characteristics of NTFS file system

Figure 2(b) and (c) show that the spatial continuity of allocated LBAs is good and basically escalate linearly with the time. In addition, there are also some random reads and writes exist. Figure 2(c) shows that there are a number of random read and write near LBAs 4.0*107, 1.0*108, 1.6*108 and 2.0*108, especially near 4.0*107 where show frequent reads and writes. We suppose that these areas may contain logs or some important data structure. Though in an overall sense the spatial continuity of NTFS is strong, it also shows that locally, the data write fails to strictly following the linear continuity and there is overlapping between LBAs.

3.2.2 EXT4-based read/write operation characteristics

EXT4 is a log-type file system and has been applied extensively in the Linux operating system. We did the sequential write tests for 10 min, 1 h and 5 h on EXT4 just as we did with NTFS.

Unlike NTFS, EXT4 does not record write requests from the start position of the logic address when the data are written in. Figure 3(a) is the data characteristics at the first 10 min. The start LBA of writes is near 1.05 × 108, and there are always read and write operations near LBAs 1.05 × 108 and 1.57 × 108. Figure 3(b) is the data characteristics at the first hour, and includes 6 locally continuous sub areas which are decentralized due to the arrangement of 10 min as a recording unit. EXT4 will choose different block groupings to store the data when each recording unit starts, i.e. the data is written into new areas separated from the previous areas for the purpose of I/O parallelism and balanced allocation of the block groupings. There are random read/write operations and multiple accesses at the initial LBAs of each sub area and near LBA 1.57 × 108, and it is believed that some block grouping and log information of EXT4 are stored in these areas. Figure 3(c) is the data characteristics in 5 h. Overall, the data distribution is in disorder and the continuity is weaker than NTFS.

Fig. 3
figure 3

Data characteristics of EXT4

3.2.3 NILFS-based read/write operation characteristics

NILFS is a typical log structured file system and is targeted at restoring the overwritten or damaged files by consecutive snapshots.

Figure 4(a), (b) and (c) give the I/O distribution at the initial 10 min, 1 h and 5 h respectively. In Fig. 4, I/O requests are mainly distributed in 3 linear areas, where the two lines near LBAs 0 and 9.8*108 are horizontal, indicating that these areas have been accessed for multiple times, and the third line is a standard incremental slash, indicating that these LBAs have been accessed at least once basically. The data characteristics of NILFS are more regular than EXT4 and NTFS, but there are frequent I/Os near LBAs 0 and 9.8*108, which results in the failure to shut down the disk grouping and negatively influences the energy saving effects of the system

Fig. 4
figure 4

Data characteristics of NILFS file system

The above data characteristics provide the basic references for our application of EXT4, NTFS, and NILFS file systems and guide us to conduct energy saving optimization on S-RAID5.

4 Architecture of EPS-RAID

S-RAID is mainly used in applications dominated by sequential writes. By analyzing the data characteristics of EXT4, NTFS, and NILFS as in section 2.2, it is found that even when the system is dominated by sequential I/Os, a few random reads and writes still exist. The existence of such random I/Os make the idle time of some disks shorten, inability to shut down or require frequent startup, which seriously impacts on the performance and energy saving effects of the storage system. This paper proposes an S-RAID-based extra parity method, EPS-RAID, to deal with the random reads and writes of the standby data disk groupings to extend the standby time of the disks. The main characteristic of EPS-RAID is as follows.

  1. (1)

    Adding 1 parity disk to S-RAID, there will be two parity disks: P and U. Parity disk P shall be calculated by exclusive OR operation with every data disk of each grouping, i.e. the former S-RAID parity; parity disk U shall be calculated according to RS codes, i.e., every data disk of each grouping multiplied by a non-vanishing element g i within the finite group GF(256) and the results do exclusive OR operation.

  2. (2)

    An SSD is added to S-RAID as the cache memory to record the new random data and intermediate U parity data(U t ) while U parity disk shall be used to record the latest U parity data.

  3. (3)

    A data processing algorithm is added to maintain logs in SSD. Keep records of updated data and temporary parity data in the face of write operations and retrieve log list in the face of read operations.

The EPS-RAID architecture is shown in Fig. 5.

Fig. 5
figure 5

Architecture diagram of EPS-RAID

The storage system consists of two parts: one part is the SSD used as cache, and the other part is a RAID consisting of several disk groupings and performing quadratic parity (P&U).

EPS-RAID contains two parity disks P&U as well as two redundancy strategies, which are similar to that of S-RAID4 and S-RAID5 respectively. We will first discuss EPS-RAID4 and then proceed to EPS-RAID5. Figure 6 is the data layout of EPS-RAID4 (3 disk groupings and 2 disks for each grouping) strategy consisting of 8 disks (6D + P + U).

Fig. 6
figure 6

Data layout of EPS-RAID4

We can see there are 8 disks in Fig. 6: D 0 to D 5 are data disks and P, U are parity disks. There are 3 groupings of disks: G 0 , G 1 and G 2 , and each grouping contain 2 disks: G 0  = {D 0 , D 1 }, G1 = {D 2 , D 3 } and G 2  = {D 4 , D 5 }. Therefore we have N array_disk  = 8 and N G  = 3. Blocks in data disks are written as B d,s where d denotes the disk number and s denotes the stripe number. Unlike S-RAID4, such data layout has a parity disk U beside the original parity disk P.

To generalize the idea to an arbitrary EPS-RAID4, we use a matrix to represent an EPS-RAID4 with n data disks and m stripes:

$$ \left(\kern1em \begin{array}{cccccc}{\mathrm{S}}_{0,0}\kern1em & \kern1em {\mathrm{S}}_{1,0}\kern1em & \kern1em \dots \kern1em & \kern1em {\mathrm{S}}_{\mathrm{n}-1,0}\kern1em & \kern1em S{P}_0\kern1em & \kern1em S{U}_0\kern1em \\ {}\kern1em {\mathrm{S}}_{0,1}\kern1em & \kern1em {\mathrm{S}}_{1,1}\kern1em & \kern1em \dots \kern1em & \kern1em {\mathrm{S}}_{\mathrm{n}-1,1}\kern1em & \kern1em S{P}_1\kern1em & \kern1em S{U}_1\kern1em \\ {}\kern1em \dots \kern1em & \kern1em \dots \kern1em & \kern1em \dots \kern1em & \kern1em \dots \kern1em & \kern1em \dots \kern1em & \kern1em \dots \kern1em \\ {}\kern1em {\mathrm{S}}_{0,\mathrm{m}-1}\kern1em & \kern1em {\mathrm{S}}_{1,\mathrm{m}-1}\kern1em & \kern1em \dots \kern1em & \kern1em {\mathrm{S}}_{\mathrm{n}-1,\mathrm{m}-1}\kern1em & \kern1em S{P}_{\mathrm{m}-1}\kern1em & \kern1em S{U}_{\mathrm{m}-1}\end{array}\kern1em \right) $$
(3)

In the matrix, each row corresponds to a stripe and each column corresponds to a disk. Element S d,s in the matrix corresponds to the block of disk D d which lies in Stripe s . The first n disks can be appropriately divided into groupings to meet the performance requirement and energy saving. For example, suppose a single disk of EPS-RAID can provide 30 MB/s write bandwidth, every grouping with 2 disks may be constructed facing an application at sequential write speed of 60 MB/s; every grouping with 4 disks may be constructed facing an application at sequential write speed of 120 MB/s.

As discussed above, EPS-RAID4 uses fixed parity disks like traditional RAID4, and the parity disks cannot be shut down or put into standby mode, so the parity disks may become a bottleneck. To ease the bottleneck of parity disks, we introduce the EPS-RAID5 that decentralizes parity blocks among the disks, as shown in Fig. 7.

Fig. 7
figure 7

Data layout of EPS-RAID5

Figure 7 shows the scenario of N array_disk  = 8 and N G  = 3. If each disk grouping requires r(r > 2) disks, we can label the LBAs of remaining r-2 disks(s) as NULL. In this case, the EPS-RAID5 will be able to work normally and obtain good energy saving effects, but the labeled disk space will be wasted.

Similar to the general form of EPS-RAID4, we represent EPS-RAID5 with n data disks and m stripes:

$$ \left(\begin{array}{ccccccc}\hfill {\mathrm{S}}_{0,0}\hfill & \hfill {\mathrm{S}}_{1,0}\hfill & \hfill \dots \hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 2,0}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 1,0}\hfill & \hfill {SP}_0\hfill & \hfill {SU}_0\hfill \\ {}\hfill {\mathrm{S}}_{0,1}\hfill & \hfill {\mathrm{S}}_{1,1}\hfill & \hfill \dots \hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 2,1}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 1,1}\hfill & \hfill {SP}_1\hfill & \hfill {SU}_1\hfill \\ {}\hfill {\mathrm{S}}_{0,2}\hfill & \hfill {\mathrm{S}}_{1,2}\hfill & \hfill \dots \hfill & \hfill {SP}_2\hfill & \hfill {SU}_2\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 2,2}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 1,2}\hfill \\ {}\hfill {\mathrm{S}}_{0,3}\hfill & \hfill {\mathrm{S}}_{1,3}\hfill & \hfill \dots \hfill & \hfill {SP}_3\hfill & \hfill {SU}_3\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 2,3}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 1,3}\hfill \\ {}\hfill \dots \hfill & \hfill \dots \hfill & \hfill \dots \hfill & \hfill \dots \hfill & \hfill \dots \hfill & \hfill \dots \hfill & \hfill \dots \hfill \\ {}\hfill {SP}_{m-2}\hfill & \hfill {SU}_{m-2}\hfill & \hfill \dots \hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 4,\mathrm{m}-2}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 3,\mathrm{m}-2}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 2,\mathrm{m}-2}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 1,\mathrm{m}-2}\hfill \\ {}\hfill {SP}_{\mathrm{m}-1}\hfill & \hfill {SU}_{\mathrm{m}-1}\hfill & \hfill \dots \hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 4,\mathrm{m}-1}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 3,\mathrm{m}-1}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 2,\mathrm{m}-1}\hfill & \hfill {\mathrm{S}}_{\mathrm{n}\hbox{-} 1,\mathrm{m}-1}\hfill \end{array}\right) $$
(4)

5 Write operations in EPS-RAID

Read operations of EPS–RAID are always sequential read operations which are composed of replaying previous write operations, such as replaying in video surveillance system. Write operations take sequential writes as a main form, but a small amount of random writes throughout the process. Here we mainly discuss the write operations of EPS-RAID.

5.1 Write operations of working disk

Working disks are mainly written in the form of sequential writes. By the analysis of characteristics in section 2, we can see that most of the writes concentrate in one main linear area which lies in working disk grouping. At this moment, whole stripe writing strategy can be used, i.e., write operation is performed when the cached data is enough to fill with a whole stripe. The whole stripe writing strategy greatly improves write efficiency.

As mentioned above, the difference between EPS-RAID and S-RAID is that the EPS-RAID adopts quadratic redundancy model where a parity disk U is added to the original parity disk P. Parity disk P will retain the original parity on S-RAID, as indicated in formula (1)(2), while parity disk U adopt the RS code parity methods similar to RAID6, i.e. every data disk of each grouping will be multiplied by a non-vanishing element g k ∈GF(256) (0 ≤ k ≤ 254) before the exclusive OR calculation. The calculation of parity disk U is as follows:

$$ {U}^{\prime }= U\underset{D_i\in {G}_k}{\oplus}\left({\mathrm{g}}_k{D}_i\oplus {\mathrm{g}}_k{D}_i^{\prime}\right)= U\oplus {\mathrm{g}}_k{D}_q\oplus {\mathrm{g}}_k{D}_q^{\prime}\oplus \cdots \oplus {\mathrm{g}}_k{D}_{q+{N}_G-1}\oplus {\mathrm{g}}_k{D}_{q+{N}_G-1}^{\prime } $$
(5)

Where g k is a non-vanishing element in GF(256). We can express it in stripe form as follows:

$$ S{U}_s^{\prime }= S{U}_s\underset{S_{i, s}\in {G}_k}{\oplus}\left({\mathrm{g}}_k{S}_{i, s}\oplus {\mathrm{g}}_k{S}_{i, s}^{\prime}\right)= S{U}_s\oplus {\mathrm{g}}_k{S}_{q, s}\oplus {\mathrm{g}}_k{S}_{q, s}^{\prime}\oplus \cdots \oplus {\mathrm{g}}_k{S}_{q+{N}_G-1, s}\oplus {\mathrm{g}}_k{S}_{q+{N}_G-1, s}^{\prime } $$
(6)

5.2 Write operations of non-working disk

Writes of non-working disk is mainly random writes, e.g. near 4*107 and 1.6*108 in Fig. 2(c), near 1.57*108 in Fig. 3(c) and near 0 and 9.7 × 108 in Fig. 4(c), etc. Though such random writes are not many in the whole write aggregate compared with sequential writes, it has great influence on the energy consumption of S-RAID. EPS-RAID focuses on optimizing these random writes using SSD and parity disk by absorbing the random writes of the non-working disks to extend the idle time of the disk groupings. Thus, frequent switch of the data disks between standby mode and working mode is avoided.

5.2.1 Writes of non-sequential data will also result in the recalculation of the parity data.

Let’s assume that EPS-RAID contains n disk groupings {G 0 ,G 1 ,……,G n-1 }, i.e., N G  = n, random writes are sent to No.s stripe of data disk grouping G k (0 ≤ k ≤ n-1), and the new data is G’ k . We can first of all calculate a new temporary parity U t :

$$ \begin{array}{l}{U}_t= U\oplus {\mathrm{g}}_k P\kern1em \\ {}\kern1em =\left({\mathrm{g}}_0{G}_0\oplus {\mathrm{g}}_1{G}_1\oplus \cdots \oplus {\mathrm{g}}_k{G}_k\oplus \cdots \oplus {\mathrm{g}}_{n-1}{G}_{n-1}\right)\oplus \left({\mathrm{g}}_k{G}_0\oplus {\mathrm{g}}_k{G}_1\oplus \cdots \oplus {\mathrm{g}}_k{G}_k\oplus \cdots \oplus {\mathrm{g}}_k{G}_{n-1}\right)\kern1em \\ {}=\left({\mathrm{g}}_0\oplus {\mathrm{g}}_k\right){G}_0\oplus \left({\mathrm{g}}_1\oplus {\mathrm{g}}_k\right){G}_1\oplus \cdots \oplus \left({\mathrm{g}}_{k-1}\oplus {\mathrm{g}}_k\right){G}_{k-1}\oplus \left({\mathrm{g}}_{k+1}\oplus {\mathrm{g}}_k\right){G}_{k+1}\oplus \dots \left({\mathrm{g}}_{n-1}\oplus {\mathrm{g}}_k\right){G}_{n-1}\kern1em \end{array} $$
(7)

where G k  = {D NG * k , D NG * k +1,  ⋯ , D NG *(k+1)−1}. P and U are the parity data corresponding to No.s stripe, and can be directly obtained as the disks remain in working mode. Note there is no old information of G k in U t , therefore it is not necessary to startup G k to read the old data. Adding in G’ k and the newest U parity data: U′ , can be expressed as:

$$ \begin{array}{c}\kern1em {U}^{\prime }={U}_t\oplus {\mathrm{g}}_k{G}_k^{\prime}\kern1em \\ {}\kern1em =\left({\mathrm{g}}_0\oplus {\mathrm{g}}_k\right){G}_0\oplus \left({\mathrm{g}}_1\oplus {\mathrm{g}}_k\right){G}_1\oplus \cdots \oplus \left({\mathrm{g}}_{k-1}\oplus {\mathrm{g}}_k\right){G}_{k-1}\oplus {\mathrm{g}}_k{G}_k^{\prime}\oplus \left({\mathrm{g}}_{k+1}\oplus {\mathrm{g}}_k\right){G}_{k+1}\oplus \cdots \oplus \left({\mathrm{g}}_{n-1}\oplus {\mathrm{g}}_k\right){G}_{n-1}\kern1em \end{array} $$
(8)

where G '  k  = {D '  NG * k , D '  NG * k +1,  ⋯ , D '  NG *(k+1)−1}. It can also be expressed in stripe form as follows:

$$ S{U}_s^{\prime }= S{U}_{ts}\oplus {\mathrm{g}}_k S{G}_s^{\prime }= S{U}_{ts}\oplus {\mathrm{g}}_k{S}_{N_G\ast k}^{\prime}\oplus {\mathrm{g}}_k{S}_{N_G\ast k+1}^{\prime}\oplus \cdots \oplus {\mathrm{g}}_k{S}_{N_G\ast \left( k+1\right)-1}^{\prime } $$
(9)

Writing U′ into parity disk U, delaying the write of new data G’ k into G k grouping and writing G’ k and U t temporarily into SSD. The largest advantage of the above operations lies in the extension of the idle time of data disk grouping G k , making it possible to remain standby instead of re-start. In addition, as U t is temporarily stored in SSD, it can be used for quick calculation of U′ when new data write occurs to G k .

In Formula (7)(8) where it is required that (g 0  ⊕ g k ),(g 1  ⊕ g k )┄(g n-1  ⊕ g k ) is not a vanishing element, it is necessary that the coefficients for each of disk groupings shall be different. GF(256) consists of 255 non-vanishing elements: (g 0 ,g 1 ,g 254 ), and g k (0 ≤ k ≤ 254) can be any one of them, but it must be guaranteed that it will not be repeated in the calculation of the same stripe. A good solution is to pre-commit the g k . Table 1 is two examples of committed stripe coefficients in EPS-RAID consisting of 4 disk groupings.

Table 1 Examples of committed stripe coefficients in EPS-RAID

The above method requires the calculation in advance of the multiplication table and the inverse element table on GF(256). Each of the tables occupies 65 k bits. In addition, the coefficient of each stripe on each data disk grouping shall be recorded, and as each coefficient needs one byte, the space required shall be very small. After the optimization of the random writes, the parity disk P can no longer be used as a parity disk due to the data it stores are not the latest parity data. But the parity disk U is still be effective and can be used to restore data. We can re-implement above small write optimization on any group again as long as we re-read G 0  ~ G n-1 and restore the parity disks P and U. Such restriction is acceptable in sequential data storage system. Therefore, this method has the best optimization effects on the multiple repeated reads and writes near 4*107 and 1.6*108 in Fig. 2(c), near 1.57 × 108 in Fig. 3(c) and near 0, 9.7*108 in Fig. 4(c).

5.2.2 Data structure in SSD and record algorithm of random writes

G’ k and U t are kept in SSD, managed in logs temporarily, as indicated in Fig. 8. Each LogID corresponds to a write block [15, 32].

Fig. 8
figure 8

Structure of log list in SSD

EPS-RAID controls the log record of blocks, deciding when to redirect blocks to SSD and when to write them in disks directly. A write request may also be split into several pieces with different logIDs respectively while it is redirected to SSD. The main log variables are as follows:

  • LogID: log manager identity;

  • LBA: LBA of random write in EPS-RAID5;

  • New block: new random write block in EPS-RAID5;

  • Parity block: temporary parity block;

  • Attached disk: disk to which the random write block is belonged;

  • Timestamp: timestamp of the random write request;

Redirected random writes will cause conformity issues of recorded data, therefore it is necessary to execute a special write request process that records every random write and its corresponding parity data. Record algorithm of random writes is as follows.

figure g

5.2.3 Read operations of SSD

The controller needs to read from SSD and switch the standby disks to working condition first when writes back the logs. There are two situations. One is incidental-write: Every disk grouping has more than one time in active mode and EPS-RAID can reconstruct logs and write them back into active disks during these periods. For example, in Fig. 3(c), LBAs of 8400 s ~ 9000 s and 9600 s ~ 10,200 s are sequential respectively and located on the same disk grouping. The logs of random writes on these disk groupings can be rewritten within any one of the two periods. The other is to set a threshold t flush to control the disks.

According to the algorithm 1, the controller need to search logs to obtain the latest version at time of writing back logs because multiple logs that have different version numbers (due to different time of updating) may have been recorded [15]. In addition, a small amount of read operations exist irregularly in logs of random writes. Read-hit in SSD is most likely to occur and LBAs with more intensive I/Os has a higher hit-rate. For example, near 15.7*107 in Fig. 3(c) and near 0, 9.7 × 108 in Fig. 4(c). The subsequent experiments also prove that our scheme contributes most to improving the degradation from these LBAs.

6 Energy consumption test

We constructed a EPS-RAID5 consisting of 12 hard disks and 1 SSD under Linux kernel 3.2.81, and the default size of data block within the stripe is 64 KB. The disks are ST1000NM0033; the SSD is Samsung840Pro and the specific parameters can be found in Table 2 and Table 3.

Table 2 ST1000NM0033 parameter
Table 3 Samsung840Pro parameter

EPS-RAID5 uses MD array management functions and diskpm tool under Linux to dispatch the disks, and will put the disk in stand-by mode when the disk has remained idle for a certain period of time without data I/Os [7]. As far as the EPS-RAID is concerned, the optimal situation is to have one grouping of data disks, 2 parity disks, and 1 SSD remaining in working conditions.

In order to test the energy consumption effects, we established an experiment environment indicated as Fig. 9 [7, 8, 27]: A 0 to A n+1 are high accuracy ammeter in series with the disk and the power. The energy consumption of the disk array includes the energy consumption of the SSD and all disks (working status and stand-by status). By measuring the current value of the ammeter periodically, the energy consumption of the whole storage system can be calculated using the formula \( W={\sum}_{i=0}^{n+1}{V}_i\ast {I}_i \), where V i indicates the voltage of the storage medium and I i indicates the current value.

Fig. 9
figure 9

Structure diagram of energy consumption test

An analog data generator was programmed with C language to simulate 256-line D1 video surveillance data. The video data shall be written into video file as append and the interval of time specified in the experiment is 10 min. 12-h energy consumption test was carried out. Though EPS-RAID consisting of 2 disks in each grouping could provide larger bandwidth, we did not challenge it in order to ensure the steady state of the system. The right part of Fig. 10 is the test results of S-RAID and EPS-RAID with 2 disks in each grouping.

Fig. 10
figure 10

A comparison on energy consumption among PARAID/eRAID/CacheRAID/DPPDL/S-RAID/EPS-RAID

The left part of Fig. 10 illustrates the energy consumption of RAID5/PARAID/eRAID/CacheRAID/DPPDL as reference. The above five data layout is configured to store 256-line D1 video surveillance data. It can be seen from Fig. 10 that the RAID5 has the largest energy consumption, reaching 9.90*106 J, mainly because the work mode of RAID5 is that workloads are balanced to use all disks even for light workload. PARAID adopts special striping method and uses different quantities of disks to match different workload, and eRAID reduces the energy consumption by reducing the speed of partial or entire mirror group disks to the standby mode, achieving the effect of energy consumption cut by 18.7% and 27.9% compared with that of RAID5. In fact, they are less-targeted as in the background of random data storage.

CacheRAID and DPPDL are two kinds of effective energy saving solutions and consume 37.6% and 35.7% power compared with that of RAID5. CacheRAID reduce the energy consumption by large-capacity and low-power SSD cache. On the other hand, the high cost per GB of SSD is not suitable for wide arrangement in the video surveillance system. We also notice that DPPDL dispatches 4 working disks on average to record the 256-lined D1 video surveillance data and is the most energy efficient layout in reference solutions. In contrast, to afford 256-lined D1 surveillance video, EPS-RAID only needs to employ 2 working disks. The main reason is that random read and write operations in workload lead to write performance degradation of DPPDL and more working disks needed to match the required bandwidth.

We also test the S-RAID in EXT4, NTFS and NILFS file systems with sequential data I/O dominated workload and find that they are all energy efficient, saving 41.9%, 48.3%, and 58.7% than RAID5 respectively. S-RAID becomes less energy efficient while the intensity of random small reads and writes increases and EXT4 performs the worst. After the optimization strategy is adopted, with 2 working disks, the energy consumption of the EPS-RAID drops by 1.49*106J (25.91%), 1.33*106J (25.98%) and 0.83*106J (20.29%) respectively compared with that of S-RAID. NTFS and EXT4 improve energy saving effect obviously but NILFS still achieves the best. In summary, EPS-RAID has remarkable energy efficiency in EXT4, NTFS and NILFS.

7 Conclusion

Surveillance video has become the largest source of the big data and consumed large amounts of energy. This paper presents an energy saving data layout by adding a solid-state disk and parity disk to deal with random data reading and writing. The scheme is suitable for sequential data storage featured workload such as video surveillance system, etc. We have designed and implemented EPS-RAID in the Linux kernel. The experiments have been carried out to show that disks can be more effectively controlled between working mode and idle mode. The major advantage of EPS-RAID is that the energy saving is greatly improved compared with S-RAID. So, EPS-RAID is a good solution to energy saving. This scheme can also be implemented at commercial RAID controllers with embedded processors, which is one of our future research works [9, 3438].