# Two-Layer Network Caching for Different Service Requirements
## 3 Model
### Caching Problems
#### 3.3.3 Case 3: Guaranteed Download Time
This choice is done for highlighting the benefits due to the use of this

Figure 10: Fraction of hits at 1 st layer caches, case 2, N = 10,000. Figure 9: Hit ratio, case 2, N = 10,000.

approach. In fact, we can observe in Figure 11 that curve relevant to Algorithm2 is above the theoretical one. The effect of resource constraints are still evident for Algorithm3 and Algorithm4, but the known popularity makes the effect of layer-1 queues appreciable. It can be observed both in Figure 11, in the rate of performance improvement for increasing size of caches and in the neatness of Figure 12, which shows a significant and steadily increasing contribution of layer-1 caches. Hence, the variable content size has not impaired the performance achievable by the proposed algorithms. When popularity is unknown, it is estimated as in the previous experiments, through a preliminary estimation during a sliding window of 2000 and 10,000 interarrival times,

Figure 11: Hit ratio, case 3. Figure 12: Fraction of hits at 1 st layer caches, case 3.

respectively. Figures 13 and 14 are relevant to first case. The theoretical curve is the same as in Figure 6.0 We can observe a slight decrease of the hit ratio, negligible for small cache size, tolerable for large ones. Most of considerations done for Figure 12 are valid also for Figure 6.1 However, the not perfect popularity estimation has an impact on the hit rate in layer-1 caches. We stress that this decrease of the hit rate in layer-1 caches is not due to a decrease of their compensation capabilities, since their size allow caching some items that had to be cached in layer-1 caches. It is due to the coarse estimation of the popularity of items that are requested rarely by users. In fact, the overall penalty in the hit rate is quite tolerable. This observation is confirmed by Figures 15 and 16, which are relevant to the longer estimation window. In this case, although popularity values are estimated, the level of the observed performance is considerable. The main outcomes of our performance evaluation campaign are summarized in in Figure 6.2 It focuses mainly on the best performing algorithm and its comparison with theoretical limit and with LFU (only for fixed item size). Clearly, Algorithm3 and Algorithm4, working with stronger constraints, will suffer of performance degradation. This has already been commented with figures and it is not captured in Figure 6.3

Figure 6.4 Fraction of hits at 1 st layer caches, case 4, N = 2000. Figure 6.5 Hit ratio, case 4, N = 10,000. ## 5 Conclusions

This paper considers a networked caching architecture based on a two-layer hierarchy, used to define some content distribution scenarios, with different complexity. The proposed caching strategies for each scenario are based on greedy algorithms with guaranteed approximation ratio, according to the theory of monotone function maximization subject to matroid constraints. In our proposals, layer-2 caches have the main role to maximize the hit ratio, while layer-1 results to have a compensating role for sub-optimal usage of layer-2 caches. These algorithms were also analyzed through an extensive simulation campaign, which highlighted the contribution of each hierarchical layer of caches to the

Figure 6.6 Fraction of hits at 1 st layer caches, case 4, N = 10,000.