## 3 Problem Description and Proposed Solution
### Method of the Proposed Approach
#### 3.2.3 Optimized PC Algorithm Based on Knowledge Graph
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Type of Resources** & **KPIs** & **Description** \\ \hline \multirow{5}{*}{Containers} & CPU usage & CPU usage (\%) \\  & MEM Usage & MEM usage (\%) \\  & FS Read Bytes & File system read bytes (bytes/s) \\  & FS Write Bytes & File system write bytes (bytes/s) \\  & Network Input Packets & Network input packets (packets/second) \\  & Network Output packets & Network input packets (packets/second) \\ \hline \multirow{5}{*}{Server Nodes} & CPU Usage & CPU usage (\%) \\  & MEM Usage & Memory usage (\%) \\  & Disk Read Bytes & Disk read bytes (bytes/s) \\ \cline{1-1}  & Disk Write Bytes & Disk write bytes (bytes/s) \\ \cline{1-1}  & Network Input Packets & Network input packets (packets/s) \\ \cline{1-1}  & Network Output Packets & Network output packets (packets/s) \\ \hline \multirow{3}{*}{Services} & Latency & Response per second \\  & QPS & Query per second (query/s) \\ \cline{1-1}  & Success orders & Success Orders (orders/s) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main monitoring KPIs. Figure 12 shows that, after CPU fault injection into the front-end container, the latency of the front-end service of the target system changed markedly during the period from 2:50 p.m. to 2:55 p.m. Accordingly, the CPU injection fault in the experiment also occurred in this period. After collecting the system performance dataset of the chaotic experiment corresponding to Table 1, we obtained the causal relation between the performance indicators by applying the causal inference graph construction method in this study. Because the complete graph is too large, a part of the complete graph is shown in Figure 13. Blue nodes are the KPIs of services, red nodes are the KPIs of the container, and green nodes are the KPIs of the working nodes for the Kubernetes cluster. To diagnose the root cause of the front-end latency, we applied the causal search algorithm. The results show that the root cause chains in Figure 14 generated by the proposed algorithm are basically consistent with the actual Sock Shop system architecture and do reflect the call relations between services. Figure 12: Front-end latency after CPU fault injection. Figure 13: Part of causality graph for all performance indicators. #### 4.3.2 Effective Evaluation

To further verify the accuracy of the causal search algorithm, we referred to our previous research work. We injected more types of faults into the Sock Shop platform, which included CPU burnout, MEM overload, disk I/O block, and network jam. Meanwhile, those faults were injected into the various microservices in Sock Shop, and the number of the injected faults for each type and each service is 20. Finally, we evaluated the performance of our causality search algorithm with two evaluation metrics in Microscope [18]:

* Precision at the top K indicates the probability that the root cause in the top \(K\) of the ranking list if the cause inference is triggered. * Recall at the top K is the portion of the total amount of real causes that were actually retrieved at the top \(K\) of the ranking list. In our experiment, we set \(K=2\). Finally, we could obtain the experimental results shown in Table 2.

The results in Table 2 show the precision and recall values of the root cause search algorithm in various services. The table shows that, except for Shipping and Payment, the precision and recall values of the services were above 80%. The main reason for the poor performance of the Shipping and Payment services is that those services were not highly dependent on other services and were not computationally intensive, even in the case of stress testing. Finally, we further evaluated the performance overhead of our method based on the above Sock Shop experiment. The evaluation experiment was conducted on one physical server (DELL R730) which was equipped with 2x Intel Xeon CPU E5-2630 v4 @ 2.10 GHz, 128 G of RAM.