# A Distributed File-Based Storage System for Improving High Availability of Space Weather Data
## 5 Experiment
### Experimental Data and Method  
This experiment was intended to evaluate the Rsync that was implemented by the existing system compared to the IPFS coupled with the IPFS-Cluster. The tests were conducted using three PC machines with the specifications mentioned in Table 2.  
Several experiments with tested parameters were conducted at the computer network lab of Keimpung University. All computers (1, 2, 3) had the same role, representing servers in the system. Each machine used a different IP network mask for obtaining a fair connection between IPFS and Rsync. Computer 1 was set up using a public IP, while Computer 2 was configured by local server IP, and Computer 3 was the client. Both Computer 1 and Computer 2 were connected with Unshielded Twisted Pair (UTP) cable to a switch, while Computer 3 was connected to Wi-Fi. To observe a more realistic scenario, the environment was set as follows:  
1. One folder was created containing four instrument folders, namely CADI, SN4000, ALE, and FLUXGATE.  
Figure 10: Index page for web monitoring.  
Each instrument folder contained a year/month/day folder.
3. All files were spread evenly only at folder day \"01\" of the month \"01\" (folder 2019/01/01/) on each instrument folder.
4. As for the parameters, the number of files (100) was varied with distinct sizes (256 KB, 1 MB, and 100 MB). The IPFS could not store files with the same content; therefore, all data was generated randomly by the /dev/urandom interface for all tests, including Rsync. There were 100 files of each size, with five trials for both Rsync and the IPFS + IPFS-Cluster. A total of 9000 datasets were tested for a total of 33.768 GB for its overall size.
5. The network latency on all computers was set, such as no latency (default), 5 ms, and 20 ms latency. Latencies were emulated artificially using the Linux traffic control (_tc_) tool.  
The purpose of our measurements was to determine the performance of the system. The file replication time was measured among machines for both Rsync and the IPFS coupled with the IPFS-Cluster. For Rsync, the duration of a file copy sent from Computer 3 and received by another computer was obtained. Meanwhile, in the IPFS + IPFS-Cluster, all machines were set as peers in one cluster. Files were replicated from Computer 3 to Computer 1 and Computer 2. Then, the elapsed time between the \"pins\" of the file by the peers was computed.  
In addition, the mean throughput was derived by calculating the average of the data replicated per second; this could be obtained by dividing the total file size by the time elapsed during replication.  
\begin{table}
\begin{tabular}{c c} \hline \hline \multicolumn{3}{c}{**Computer 1**} \\ \hline Processor & Intel XEON E3-1220 4C 3.1 GHz \\ RAM & 4 GB \\ HDD & 500 GB SATA \\ OS & Ubuntu 18.04 \\ Network & PCI Ethernet 1 Gbit/s \\ \hline \hline \multicolumn{3}{c}{**Computer 2**} \\ \hline Processor & Intel(R) Quad Core KVM Processor \\  & Intel 2 Xeon E5-2650v3 (Host) \\ RAM & 2 GB \\ HDD & 100 GBSATA \\ OS & Ubuntu 18.04 \\ Network & PCI Ethernet 1 Gbit/S \\ \hline \multicolumn{3}{c}{**Computer 3**} \\ \hline Processor & Intel(R) CoreTM i5-3317U CPU @1.70 GHz \\ RAM & 4 GB \\ HDD & 500 GB SATA \\ OS & Ubuntu 18.04 \\ Network & Qualcomm Atheros AR9485 \\ \hline \multicolumn{3}{c}{**Network Hardware**} \\ \hline Cable & UTP Cat5e \\ Wireless Access Point & TP-Link TL-WA901 ND 450 Mbps \\ Switch & HP 1410-24G \\ TP-Link TL-SG1016D \\ \hline \multicolumn{3}{c}{**Wi-Fi Performance**} \\ \multicolumn{3}{c}{**(Average transfer rate using _ifstat_ from Computer 3)**} \\ \hline Download & 16.15 KBps \\ Upload & 18.82 KBps \\ \hline \hline \end{tabular}
\end{table}
Table 2: Specifications of tested machines.