## 5 Simulation and Performance Analysis
### Results and Analysis
The red curve is the result based on the reinforcement learning algorithm (DQR), the green curve is the result of the traditional graph theory algorithm (SFC-APS), the magenta curve is the result of the algorithm proposed in this paper (DQN-LBR), and the blue curve is the result of the algorithm proposed in this paper (GDRL-SFCR). FN represents the total number of functional nodes in the end-to-end path SFC constraint. We also analyzed the network capacity performance of the proposed algorithm. Figure 6 shows the network capacity under different numbers of data flows and numbers of function constraints. The network capacity performance of the algorithm proposed in this paper is significantly better than that of the other algorithms. The reason is that the other algorithms do not consider the joint optimization of network load and path delay in decision making, while the GDRL-SFCR method considers the optimization of the network load, which effectively reduces the network load and increases the network capacity. We also analyzed the impact of the weights on the objectives of this paper, and we tested the delay \(D\), load variance \(L\), and comprehensive KPI for \(\theta_{1}\in[0.1,0.9]\) (step 0.1) under the same traffic load. KPI was calculated using \(KPI=\frac{1}{Delay(Delay_{max}}+\frac{1}{LoadLoad_{max}}\), and \(Delay_{max}\) and \(Load_{max}\) are the maximum observed values in the experiment. As can be seen from Figure 7, when \(\theta_{1}=0.6\) achieves a better balance between delay and load, and the algorithmic performance is insensitive to the change in \(\theta_{1}\) in the interval of \((0.5,0.7)\). Finally, we analyzed the running time performance of all the algorithms. As can be seen from Figure 8, the running time of DQR is significantly higher than that of SFC-APS and GDRL-SFCR. In addition, when there are more than 2000 data flows, the running time of DQR increases rapidly. This is because when there are more data flows, the state space  
Figure 6: Network capacity of different data flows. The red curve is the result based on the reinforcement learning algorithm (DQR), the green curve is the result of the traditional graph theory algorithm (SFC-APS), the magenta curve is the result of the algorithm proposed in this paper (DQN-LBR), and the blue curve is the result of the algorithm proposed in this paper (GDRL-SFCR). FN represents the total number of functional nodes in the end-to-end path SFC constraint. Figure 7: Impact of weight \(\theta_{1}\) on performance metrics. The green curve is the result of KPI variation with weights. The blue curve is the path delay variance as a function of weight. The blue curve is the result of network load variance variation with weights. and action space in the Q-table greatly increase. In this case, finding the optimal strategy based on the table becomes difficult, as it takes more time to find the optimal strategy in large networks. Although GDRL-SFCR takes more time to train the neural network compared to DQR, after it is trained and deployed, it simply uses the trained neural network to perform inference. The main reasons for this include high computational cost due to the complexity of updating the policy and value network, prolonged execution time due to the high-dimensional state and action space, and model scalability issues as the network size increases, leading to exponential growth in resource requirements. To address these issues, we employ several mitigating measures during training: parallelizing the task using the OpenRL [54] distributed computing framework, simplifying the dimensionality of the state space by using only the features of neighboring nodes, accelerating the training process by using GPUs, and employing optimization algorithms such as Adam to speed up convergence. These strategies can improve the efficiency and scalability of GDRL-SFCR and make it more suitable for large-scale applications.