## 4 Performance of SERENA and TDMA/CA
### Impact of Heterogeneous Traffic  
We now study the impact of heterogeneous traffic on end-to-end delays. We always consider the topology depicted in Figure 8 with 49 nodes and a density 8 and a data gathering application. Instead of considering that each node generates a message every 5 seconds like in Section 4.4, we now assume that one third of nodes, randomly chosen, generate a message every 2 seconds, the second third of nodes, randomly chosen, generate a message every 5 seconds and the last third once every 8 seconds. Globally the same amount of traffic is generated as considered in Section 4.4. We measure the end-to-end delays in the same conditions as previously, a buffer size of 40 messages at each node. Results are depicted in Figure 16.  
We get an average end-to-end delay of 3.05 seconds instead of 2.93 seconds for the homogeneous case. However, the maximum delay now reaches 10.25 seconds instead of 5.99 seconds. We also observe some losses: in average over 100 simulation runs, four messages are lost because of buffer overflow. Only one node is subject to buffer overflow, it is node 29, which has 32 descendants in the tree (see  
Figure 16: End-to-end delays with: (a) homogeneous traffic; (b) heterogeneous traffic.  
the topology depicted in Figure 8). Indeed, the paths of 32 nodes toward the sink converge at node 29, explaining the high load submitted by this node.  
We now vary the size of the buffer present at each node (20, 40, or 60 messages) and study its impact on message loss. Results are depicted in Figure 17. Notice that the size of 40 messages correspond to the size used in the previous simulations. When the buffer size decreases, case of 20 messages, the number of message loss increases to reach 76 in average. However, messages that are delivered experiment shorter delays. Conversely, there is no message loss for a buffer size of 60 messages.  
As expected, packet loss due to buffers overflow and additional delays are observed when nodes sharing the same color generate heterogeneous traffic. In order to avoid packet loss, at least two solutions are possible. First, each parent in the tree should aggregate the data received from its children before transmitting them to its own parent. All the simulations results reported in this paper are obtained without aggregation. Aggregation would decrease message losses. A second solution would be the use of colored slots of different sizes. More precisely, the size of the colored slots should be affected according to the  
Figure 17: End-to-end delays with heterogeneous traffic with buffers of: (a) 20 messages; (b) 60 messages.  
highest traffic amount present in the buffers of nodes sharing the same color. This enhancement will be studied in our future work by adding a new primitive to inform the coordinator of the network of the maximum traffic size for each color. Notice that in a data gathering application where the amount of traffic sent by a node is directly proportional to its number of descendants, it suffices to attribute a larger size to the slots corresponding to small colors. Indeed, nodes with a high number of descendants are colored first and consequently receive a small color. This small color will get a larger slot size. A more precise buffer dimensioning can be done with Network Calculus, as done in [28].