# EdgeX over Kubernetes: Enabling Container Orchestration in EdgeX
## 5 Performance Evaluations
### Performance Change in EoK Using HPA  
This section verifies the performance improvement of EoK through the HPA of Kubernetes by evaluating CPU usage, processing time, throughput, and latency according to the number of pod replicas. Figure 6 shows the changes in the average CPU usage and number of pods during 3000 requests from outside the cluster when the maximum number of replicas was set to 1, 2, and 4. As shown in Figure 6, we can observe that CPU usage increased with increasing traffic requests, and the number of replicas increased up to the maximum as well. For example, the number of replicas in Figure 6a could not further increase because the maximum number of replicas was limited to 1, whereas the number of pods in Figure 6b increased at 120 s, and that in Figure 6c increased at both 230 s and 300 s. According to the increase in replicas, the average CPU usage tended to decrease, as did the completion time, while processing 3000 requests. In Figure 6, we can observe that the processing was completed at 840 s with 1 replica, 720 s with 2 replicas, and 660 s with 4 replicas. On the contrary, EdgeX Foundry does not support the HPA function, so it showed the same performance as when limiting the maximum number of replicas to 1 in Figure 6a. Therefore, we can conclude that it is difficult to improve the throughput with only EdgeX Foundry. Figure 7 evaluates the average CPU usage according to the number of pods, throughput, and latency for different numbers of replicas. It is important to note that Figure 6 measures the performance according to the change in the number of replicas over time starting with 1 replica, while Figure 7 evaluates the performance using a fixed number of replicas (1, 2, or 4) in EoK to focus on the effect of the number of replicas as opposed to the original. In these evaluations, we include the evaluation of EdgeX Foundry to compare the difference in the performances of EoK and EdgeX Foundry. However, the evaluation result of the original is expected to resemble that of EoK with one replica, because EoK with one replica is architecturally equivalent to EdgeX Foundry except for the presence of a Kubernetes cluster. As a result, the process completion time in Figure 7a reduced to 840 s for 1 replica, 600 s for 2 replicas, and 480 s for 4 replicas compared with the 840, 720, and 660 s shown in Figure 6a-c, respectively. Moreover, the process completion time of EdgeX Foundry is the same as that of EoK with one replica. Figure 7b shows the throughput of EdgeX Foundry and EoK according to the number of concurrent requests. First, as expected, when one replica was used in EoK, the throughput observed was the same as that of EdgeX Foundry because both cases have equal resources for the service. Moreover, we can see that the throughput could not be increased due to the resource limit, even as the number of concurrent requests increased. On the contrary, the throughput of EoK with 2 and 4 replicas increased to approximately 17% and 71%, respectively, as the number of concurrent requests increased. More specifically, the throughput with 2 replicas increased from 6 to 7 requests/s as the number of concurrent requests increased from 1 to 5, while that with 4 replicas increased from 7 to 12 requests/s under the same conditions. It is interesting to note that Kubernetes provides load balancing  
Figure 6: Average CPU usage and number of replicas for EoK with HPA (**a**) up to 1 replica, (**b**) up to 2 replicas, and (**c**) up to 4 replicas. by forwarding requests to multiple replicas; thus, we can expect the throughput to be improved by increasing the number of pod replicas. However, in contrast to the increase in throughput according to the number of replicas, the increase in throughput according to the number of concurrent requests varied depending on the maximum number of replicas. This can be seen as a result of the difference between the required number of resources to handle the actual traffic and the maximum available resources.