# NDN Content Store and Caching Policies: Performance Evaluation
## 5 Simulation and Discussion
### Simulations Results
#### 5.2.1 Cache Hit Ratio  
Figure 2 shows the network performance in terms of CHR, for the aforementioned two topologies and two different content request rates. In general, from this figure, we can conclude the following:  
* The network performance (in terms of CHR) increases with the increased number of CS. This result is achieved because with more CS in the network, there is a higher probability of finding the requested content on CS along the route before reaching the content producer. When the number of CS is decreased, the available CS are quickly filled up, and the cache replacement occurs more frequently. It is important to note that the size of the CS plays a role in the magnitude of the results achieved here. For a reduced size, as is the case in this work, more frequently, the CS is filled up, requiring frequent replacement for a new content. The reduced CS size is deliberately chosen. Considering the defined consumer request rate, the resulting traffic is busy enough to fill up the CS and, thus, activate the replacement policy. * Although for each replacement policy, the higher gain on using CS is noticeable when increasing the percentage of CS from 0 to 50%, the difference among the policies in terms of their performance is more noticeable with a higher number of CS in the network. This result is a good metric for advising a specific scheme for a given network. Specifically,
* Figure 2a shows LFU performing better with CS below 40%. After this threshold, LRU presents better performance. For CS above 50%, FIFO also presents a better performance than LFU and random. * Figure 2b-d shows a similar, linear behavior, where, different from Figure 2a, LFU presents a better performance than all other policies. In addition, we can see that random performs now relatively well, with performance levels similar to LRU for a CS level above 50%. Concerning the difference in terms of performance mainly between LFU and LRU, we recall that, different from LRU, which is only based on the access time to decide on eviction, LFU is based on both the time and frequency of the access/request and, therefore, performs well for more popular contents. If we isolate a specific node/router, to which the consumer(s) is connected, we have for Topology 1 a particular node requesting 100 different contents from the same consumer, thus, in a given time period, the contents will be less popular than for Topology 2, where with a lesser request frequency (5 packets/s each by four or five consumers connected to a node), the number of new packets per equivalent time period is reduced. Therefore, as the results show, in Topology 1, LRU performs better than LFU. However, in Topology 2, LFU performs better because the contents become popular more easily. A particular situation is presented on Topology 1, where LRU performs better for a consumer request rate of 100 packets/s and, LFU performs better when consumers request content at a rate of 5 packets/s. The justification is similar: with fewer requests for different content in a specific time period, the existing content stays in CS for longer. Combining the dimensions of LFU, time and access frequency, this policy will perform better. The conclusion presented in the last paragraphs are further reinforced by the results from the aforementioned scenario with a more complex traffic (i.e., 32 consumers and 10 producers), as shown by Figure 3. With an increased traffic, LFU (combining time and access frequency) performs better. Figure 3c,d show the same simulation and behavior as the results shown in Figure 3a,b, respectively, but with \(\alpha=0.75\). As presented earlier in Section 3.1, the skewness factor affects the CHR, reducing it when \(\alpha\) is low. However, as shown by the results, the relative behavior among the scenarios is not affected. Figure 2: CHR evolution with variable number of CS, for scenarios with 41 consumers and 1 producer. LFU and random present lower sensitivity to the variation of CS than LRU and FIFO in a less complex and less busy network; see Figure 3(a).