## 3 Algorithms to Improve the Data Write Rate
### Data Write Performance Tests Using Binary Formats
#### 3.2.5 Approach 4. Multidrive Write  
In computer science, a technology called the redundant array of independent disks (RAID) combines two or more hard drives. Various RAID levels are available, with RAID 0 offering the best performance. Accordingly, the data are divided into blocks and alternatively written across multiple drives simultaneously, as shown in Figure 8. This technique significantly reduces the write latency, leading to a significant boost in the write performance. A combination of two similar drives with RAID 0 offers twice the write rate and double the capacity of a single drive. With three similar drives, the achievement triples, and so on. RAID 0 offers a superior write performance. However, it is difficult for engineers to implement this technique owing to the following disadvantages:  
* The entire data on the hard drives are erased during the RAID setup. * A lack of flexibility in the configuration, such as adding or removing a drive, necessitates starting anew and erasing all the existing data. * Unable to read data when one of the drives is damaged. * To maximize the write performance, all hard drives must have the same capacity and write rate. For example, combining a 512 GB capacity and 120 MB/s write rate drive with a 128 GB capacity and 150 MB/s write rate drive in an RAID 0 system results in a system with a capacity of 128 \(\times\) 2 = 256 GB and a write rate of 120 \(\times\) 2 = 240 MB/s. The achievement level is based on the lowest capacity and rate. Figure 8: Data distribution across the three drives, based on the principle of RAID 0. Thus, a solution was proposed in this study to solve these concerns. It also requires at least two drives to store the data. In this study, three HDDs were employed for testing, and their specifications are listed in Table 3. HDD #1 was the hard drive utilized in the previous tests. Write performance tests were conducted for each HDD. The test procedure was the same as that described in Section 3.2.2. Accordingly, the 5 GB data were written into multiple equal-sized 512 MB files. Although HDDs #1 and #2 had the same manufacturing specifications, their write performances differed owing to the differences in runtime (power-on hours). The test results showed that the average data write rates for the drives were 162, 172, and 138 MB/s, respectively. Herein, we describe a solution that utilizes a combination of three drives to enhance write performance. The write algorithm involved modifications to Approach 2. In addition, a 15 GB data pack was created for testing. The test procedure was performed as follows:  
* Three distinct folders were selected to store the data, each located on a different drive. - Setting the buffer size--this is the configuration of a self-created buffer. * Step 2: A new data file located in folder #1 was created. * Step 3: The values were read from the data pack and copied into the buffer. When the buffer became full, all the values were copied to a data block. * Step 4: A new thread was created to write the data block to the file and then closed. * Step 5: The buffer was reused as a new buffer for the new values. A new file located in folder #2 was created to store the data. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **HDD \#1** & **HDD \#2** & **HDD \#3** \\ \hline Manufacturer & Western Digital & Western Digital & Toshiba \\ Model & WD10 EZEX & WD10 EZEX & DT01 ACA200 \\ Storage capacity & 1000 GB & 1000 GB & 2000 GB \\ Free capacity & 750 GB & 750 GB & 1200 GB \\ Connectivity technology & SATA 6 GB/s & SATA 6 GB/s & SATA 6 GB/s \\ Form factor & 3.5 inches & 3.5 inches & 3.5 inches \\ Rotational speed & 7200 rpm & 7200 rpm & 7200 rpm \\ Power-on hours & 31,280 h & 8180 h & 8170 h \\ Year & 2012 & 2012 & 2013 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Specifications of HDDs for the write performance tests. Figure 9: Configuration to store data on multiple drives. The process was repeated with folders #2 and #3 and then returned to folder #1 until all data had been written.