A comprehensive evaluation of cache utilization characteristics in large scale WSN considering network driven cache replacement techniques

WSNs as adopted in current smart city deployments, must address demanding traffic factors and resilience in failures. Furthermore, caching of data in WSN can significantly benefit resource conservation and network performance. However, data sources generate data volumes that could not fit in the restricted data cache resources of the caching nodes. This unavoidably leads to data items been evicted and replaced. This paper aims to experimentally evaluate the prominent caching techniques in large scale networks that resemble the Smart city paradigm regarding network performance with respect to critical application and network parameters. Through respective result analysis valuable insights are provided concerning the behaviour of caching in typical large scale WSN scenarios.


Introduction
During the last several years Smart Cities concept is attracting active interest as a prominent approach to enhance everyday life quality. The potential benefits concern a wide range of application scenarios from traffic control and environmental conditions monitoring to individuals' bio signals' monitoring and safety control [1][2][3]. As it is easily understood such a wide range of different and diverse applications form a quite complex, dynamic and unpredictable set of traffic sources which the underlying networking technology must handle. In parallel in many relative design and implementation efforts, WSN and their realization in the IoT paradigm, appear to be a quite popular technological solution offering critical advantages through its communication model and state-of-the-art existing platforms [4]. WSNs main communication characteristic include rapid and flexible connection setup, fast adaptation to topological and traffic conditions, exploitation of multi-path communication, low power operation and many more that comprise attributes of paramount In that context, this paper, adopts caching techniques already presented in previous works and evaluates it in large scale networks which depict a more realistic Smart City scenario. In Section 2, related work on caching techniques and WSNs is presented. Section 3 describes how caching is defined and implemented in current work, while on Section 4 the experimental setup that was followed is described. Finally, the paper results are presented in discussed in Section 5.

Related Work
As already described, cache memory techniques, aiming to address WSN challenges, can offer significant advances with respect to all performance metrics. In [7] an energy efficient caching scheme is presented as integer linear program where the authors provide caching through the distribution of the server content to nodes across the network. Their main concern is to reduce the energy expenditure that is caused by the dissemination of the server content. In [8], a high performance, low complexity cooperative caching scheme is presented and applied over an 802.11 MAC protocol. A comprehensive survey [9] of such techniques describes state-of-the-art cache-based transport protocols that aim to optimize energy consumption and data transmission in WSN.
Current work, presented in this paper extends previous efforts of the authors to highlight the high impact of caching in WSN. These efforts were focused on replacement techniques based on the traffic characteristics and were evaluated in simulation [10] and real platform scenarios [11]. This work, differentiates in the network size under which caching techniques are evaluated. To achieve a more realistic setup that is closer to Smart City application and the IoT paradigm, caching reflection on network performance is tested in simulated environment of 1000 wireless nodes.
The main idea of cache memory utilization is to enable the storage of information accessed more frequently closer to the consumer node compared to fetching them from the producer node. Such capability reduces transmission delay and the number of a packet's retransmissions. Furthermore, by strategically placing cache memories data burst as well as data hot spots can be effectively handled. Despite, the respective significant benefits cache techniques can yield relative limited effort is available concerning the effect of applying such techniques in large scale networks, networking driven cache functionalities as well as strategic placement of cache to maximize the performance enhancement while minimizing the required memory overhead to network nodes. To achieve this, the replacement approach we followed is based on the principle that least frequently used (LFU) data should be evicted with higher priority from the cache memory. In our LFU implementation an array of 10 data slots holds and updates the access frequency of each data element. At every cache hit the access frequency of the corresponding cached value is increased by 1. When a cache miss occurs the data should be retrieved by the server node. Furthermore, the incoming data element should be stored in the cache for potential future reuse. In case that the cache memory is already full then replacement is needed. The cached data array is parsed and the data element with the smallest access frequency index is identified. This data element is the evicted from the cache and replaced by the new data element that the client received by the server. Replacement mechanism is given in the flowchart of Fig. 1.

Experimental Setup & Results
Accurate and objective large-scale network evaluation is based on Cooja being one of the most well-known Contiki OS based WSN networks enabling monitoring and measuring all required behavioural and performance network metrics. Furthermore, in order to simulate low and high traffic conditions that might occur from independent source during the normal operation of the WSN application. Edge case scenarios were simulated were clients requesting data and servers serving them are located at the edges of the routing paths of the network. On the other hand, to balance the overhead between serving cached data after cache hit and fetching new data after a cache miss, caching nodes were located in the middle of the maximum routing paths. An abstract representation of the network formulation is depicted in Figure 2.

Figure 2. Network formulation
Experimental results, present significant gains in improving the packet loss ratio. As shown in Figure 3, the impact of adopting caching techniques in high data rates (traffic rate value of 2, equals to an interval of 39msec) result in a 60% rate of successful data delivery, while on the cacheless setup, data delivery rate drops at 40%. Performance gains are observed in more relaxed traffic rates also. Data delivery performance is significantly benefitted by the existence of cache nodes across the route paths which decrease the transactions and consequently relax the network traffic.
As expected, this is also reflected in energy consumption, as depicted on Figure 4. Energy consumption is clearly decreased on every traffic factors when cache usage with LFU replacement technique is adopted. Energy consumption has been evaluated based on the [12] which present the telosB power consumption model.

Conclusion
Primary experimental results indicate significant performance gains concerning packet loss ratio, energy consumption and packet delivery delays are achieved even in large scale networks when caching techniques are applied. These gains, have significant impact in the increase the lifetime of the network, optimize the traffic condition and consequently optimize the application performance and failure resilience. However, further investigation and experimentation should be conducted focusing on the cache location in the network. This is a factor of high importance considering caching performance (hit/miss ration) that could further affect the network traffic and application performance. Moreover, special care should be given in data invalidation, since caching data may result in invalid data to be consumed by the clients and lead the application to fail.