# Performance Analysis of Internet of Vehicles Mesh Networks Based on Actual Switch Models
## 3 Network Architecture and System Model
### Task Forwarding Model  
To address the traffic forwarding issue in IoV mesh networks and gain insights into traffic distribution within the network, this subsection proposes a forwarding model based on actual switches to analyze the network traffic in different states. Initially, the analysis is performed for a single service. Within an IoV mesh network with \(p\) nodes, the switch model for forwarding a single task at each vehicle node is shown in Figure 5. Here, \(\lambda\) represents the input traffic of the task at the node, \(\mu\) denotes the output traffic (i.e., the forwarded traffic through the switch), \(C\) indicates the node's cache capability. The cache refers to the data exchange buffer on the network layer of the node switch, also called the packet buffer size, which is a queuing structure that is used by the switch to coordinate speed-matching problems between different network devices. When a switch does store-and-forward, it presses the packets in the buffer into the egress queue for transmission. \(L\) denotes the actual cache queue length of the node. Furthermore, the node's performance incorporates its forwarding capacity, represented by \(F\). When the switch forwards, tasks in the cache queue are taken out and pressed into the egress queues of different ports according to rules, and the egress queue length is the egress link rate. Figure 4: Port route model. Based on Section 3.2, the per-hop port routing of the task can be obtained. Simultaneously, combined with the network topology, we can ascertain the link rate denoted as \(R\) between the current location node of the task and the subsequent hop node. Consequently, two distinct scenarios emerge for forwarding traffic of a single task:  
(1) \(\lambda+L\leq C\): At this point, the sum of the actual cache queue length of the task node and the task input traffic is less than or equal to the node's cache capacity. Therefore, the task has no packet loss on this node, and the output traffic is constrained by the node's forwarding capacity and the forwarding link rate, i.e., \(\mu=\min\{\lambda+L,F,R\}\). The actual cache queue length is further updated as \(L^{\prime}=\lambda+L-\mu\). (2) \(\lambda+L>C\): At this point, the sum of the actual cache queue length of the task node and the task input traffic is greater than the node's cache capacity. So the task will lose some packets at that node, and the number of packets lost is represented by \(Loss=\lambda+L-C\). In this case, the task enters the switch and the packet loss occurs first. Furthermore, the node's cache is full, and thus the switch's forwarded traffic is \(\mu=\min\{C,F,R\}\), and the actual cache queue length is further updated to be \(L^{\prime}=\lambda+L-Loss-\mu\). Once \(\mu\) has been obtained, it is necessary to calculate the input traffic at the next hop node. The input traffic is influenced by the actual link rate denoted as \(R^{\prime}\), as switches are incapable of sensing interruptions or reductions in link rate (i.e., changes in egress queue lengths) caused by environmental fluctuations. In conjunction with the changing real network topology, the following two scenarios exist:  
(1) \(\mu\leq R^{\prime}\): At this point, \(\mu\) is less than or equal to the number of packets that the link can actually transmit per unit of time, so the number of packets lost on the link is 0, and the input traffic to the next hop node is \(\lambda=\mu\). (2) \(\mu>R^{\prime}\): At this point, \(\mu\) is greater than the number of packets that the link can actually transmit per unit of time, and packet loss will occur on the link, with the number of packets lost being \(Loss^{\prime}=\mu-R^{\prime}\). Therefore, the input traffic to the next hop node is \(\lambda=R^{\prime}\). For the multi-task scenario, when scaling single-task traffic to multi-task traffic, traffic on different ports on the node will be overlapped. An example of three nodes with two tasks is as follows.