## 4 Performance Evaluation
### Friendly-Sharing Diffusion Evaluation  
In this section, we study the benefits of the proposed Friendly-Sharing diffusion approach compared to the standard epidemic protocol. For the sake of brevity, we will focus on the smallest/largest buffer management policies as the previous subsection demonstrates that they obtain the best delivery probability. We repeat the same simulation parameters schema with different buffer sizes and TTL times, summarised in Table 4.  
Figure 8(a) shows the delivery ratio of opportunistic networks in relation to the Friendly-Sharing maximum time. A value of 0 in the \(x\)-axis represents the epidemic protocol without any additional wait, and a value of \(\infty\) refers to the _full-wait_ approach, where nodes wait until they transmit all messages in their buffers. The experiment shows, as expected, that waiting until all messages are interchanged improves the message diffusion. In this case, the epidemic protocol has a delivery probability less than 0.45, while increasing the wait time from 2 s to 16 s the delivery probability improves to 0.50. The best probability appears for the _full-wait_. As in the previous experiments, the TTL parameter is the main delivery performance factor, showing that an increase from 12 to 24 h improves the delivery probability by about 20%. Using a bigger buffer has little impact with a TTL of 12 h and no discernible improvement when the TTL is configured to 24 h.  
Regarding latency, comparing both plots in Figure 8(b), it is clear how it decreases as the delivery probability increases for each TTL value. This validates our previous assumption of an approximate inverse relation between the two measures. Following this relation, the buffer size does not have much impact on latency, and the TTL continues to be the main factor. These experiments show a clear trade-off between delivery probability and latency. Allowing a large TTL greatly improves the delivery probability, it also increases the latency. Roughly, doubling the TTL from 12 to 24 h improves the delivery probability by 50%, but the latency is \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Values** \\ \hline Buffer Size & 50 MB, 100 MB, 200 MB, 1 GB \\ Routing & Epidemic, Friendly-Sharing \\ Maximum wait time & 2 s, 4 s, 8 s, 16 s, \(\infty\) \\ Time to Live & 12 h, 24 h \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Simulation parameters varied to evaluate diffusion approaches. Figure 9: Average delivery success ratio and latency. also doubled. This limit on the routing performance is due to the movement traces themselves, which dictates how much time it takes to contact, from one node to another. Considering protocol overhead, Figure 10a shows the maximum of the average buffer occupancy from each node. With the simulated workload, a buffer of around 80 and 175 MB seems sufficient for a TTL of 12 and 24 h, respectively. Bigger buffers are only required when simulating the ideal scenario with indefinite pauses. It is interesting to note that even small additional waiting times improve the delivery probability and latency without increasing the buffer overhead. In epidemic protocols, another overhead measure is the amount of information forwarded per node. Figure 10b shows the daily average bytes forwarded by each node, which is the sum of all bytes transmitted divided by the number of nodes and the simulation length in days. The number of transmissions increases greatly with a large TTL time, basically because more messages stay in the buffers during more time. A big buffer avoids unnecessary retransmissions; therefore, it also reduces the time required by nodes to stop waiting to complete the data transfer. This protocol does not provide any reception acknowledgements; therefore, nodes keep forwarding messages that have already reached their destination, up to the maximum of TTL time.