## 4 Results and Discussion
### Spark Parallel Performance Test  
We use three machines (Name node: the machine with Intel(r) Core(tm) i5-2300 CPU @ 2.80 GHz \(\times\) 4 and 16 G RAM, Data nodes: two machines with Intel(r) Core(tm) i5-4590 CPU @ 3.30 GHz \(\times\) 4 and 7.9 GB RAM) to setup the Spark-Hadoop cluster. Each machine has 4 cores.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Num** & **Sample** & **Average** & **Median** & **90\% Line** & **Min** & **Max** & **Throughput** & **Received** & **Sent** \\ \hline
50 & 14,250 & 462 & 2 & 962 & 0 & 29,654 & 102.06055 & 4665.54 & 163.09 \\
100 & 28,500 & 995 & 2 & 2078 & 0 & 61,959 & 94.76782 & 4332.16 & 151.43 \\
200 & 57,000 & 2035 & 2 & 3776 & 0 & 161,624 & 93.13254 & 4259.62 & 148.82 \\
400 & 114,000 & 3963 & 1959 & 6491 & 1 & 172,887 & 94.51177 & 4323.2 & 151.02 \\
800 & 228,000 & 7504 & 5686 & 11,423 & 0 & 185,151 & 99.34736 & 4535.04 & 158.75 \\
1000 & 285,000 & 9060 & 7372 & 12,803 & 1 & 179,033 & 101.2627 & 4629.35 & 161.81 \\ \hline \hline \end{tabular} \(\bullet\): Num: Numbers of user.  
\(\bullet\): Sample: Total number of requests.  
\(\bullet\): Average: Average response time. Unit: ms.  
\(\bullet\): Median: median value of response time, Unit: ms.  
\(\bullet\): 90% Line: 90 percent requests’ response time less than this value, Unit: ms.  
\(\bullet\): Min: Minimal response time, Unit: ms.  
\(\bullet\): Max: Maximal response time, Unit: ms.  
\(\bullet\): Throughput: Request number per unit time.  
\(\bullet\): Received: The amount of data received from the server per unit of time, Unit: KB/s.  
\(\bullet\): Send: The amount of data sent per unit of time, Unit: KB/S  
\end{table}
Table 6: System stress test results.  
\begin{table}
\begin{tabular}{c c} \hline
**Test Environment** & **Configuration Parameters** \\ \hline Stress test software & Jmeter 3.1 \\ Web application server & Tomcat 8.5.11 \\ Operating System & Windows 10 Pro 64-bit \\ Central Processing Unit & Intel(R) Core(TM) i5-6600 CPU @ 3.30 GHz \\ Memory & 16384 MB RAM \\ Bandwidth & 1000 Mb/s \\ \hline \hline \end{tabular}
\end{table}
Table 5: System test environment.  
By comparing the computational performance of Spark, MapReduce and serial programming, the computation time of Spark is significantly less than MapReduce and serial programming. The results are as follows:  
As shown in Figure 15, when the dataset size increases, the efficiency of Spark has a great advantage than MapReduce and serial programming. The computation time of Spark is less than that of MapReduce and serial program in the data size of 550M, 826M and 1034M.  
For the different sizes of datasets, we controlled the degree of parallelism by the number of cores and test the performance of Spark. As shown in Figure 16, when the size of datasets is small, we can see the increase of the number of cores couldn't improve the performance, even make the performance down slightly, such as the datasets of Dataset_168M and Dataset_550M. When the size of datasets becomes bigger, the increase of the number of cores would get remarkable improvement in the performance, such as the dataset of Dataset-826M and Dataset-1034M. Spark is more suitable for the online analysis and computing of the large dataset of plant electrical signals [50].  
Figure 16: Spark computing performance under different CPU number.  
Figure 15: Computation performance of Spark, MapReduce and Serial programming.