# An Edge-Based LWM2M Proxy for Device Management to Efficiently Support QoS-Aware IoT Services
## 4 QoS-Oriented Extended Functions
### Requests-Shaping
#### 4.1.2 Performance Evaluation  
To evaluate the advantages of introducing the proposed requests-shaping function, we consider a testbed scenario composed of a sensor network, a Server and a Proxy, as depicted in Figure 5. A Client runs on a wireless sensor node using the 6 LoWPAN protocol [8] on top of the IEEE 802.15.4 MAC [19], operating in the 2.4 GHz band, and located three hops away from the 6 LoWPAN Border Router. The system is emulated using the COOJA network emulator [18] and uses RPL [20] as routing protocol. The Server and the Proxy are developed using the Eclipse Leshan library [22]. We consider a Client with a sensor that collects information at a periodic sampling rate; indeed, periodic sampling is widely used by IoT devices because the simplicity of periodic sampling is well-fitted with devices which have limited computational resources. The onboard sensor of the Client is a temperature sensor that samples the temperature each 60 s.  
We model the arrival of LWM2M requests as a Poisson process with cumulative rate \(\lambda\), and we consider the following metrics: (i) service delay, defined as the time between the request is sent by the Server and the time the corresponding response is received, (ii) service loss, defined as the percentage of LWM2M requests that did not receive a response according to requests sent. First, we evaluate the same scenario considered in Section 3, now taking into account the case when the Proxy is in place, and we compare the case where the Proxy does not implement the request shaper against the case where the Proxy implements the request shaper with the maximum size of the congestion window fixed to one. Figure 6 shows the cumulative distribution function of the service delay for different values of \(\lambda\) using a log scale on the \(x\)-axis. When the rate \(\lambda\) increases, if the Proxy does not implement the request shaper, the distribution shifts to the right and its tail is heavier; in addition to this also the packet loss increases, as reported in Table 2. Instead, when the request shaper is used, the maximum experienced service delay decreases significantly, the tail of the  
Figure 5: LWM2M architecture instantiated in a 6 LoWPAN network. distribution is shorter and there is no service loss. This happens because the Proxy that uses the requests-shaping function can control the traffic load in the network avoiding congestion. We can notice that the service delay experienced with the requests-shaping function using a window value equal to one is not always better than the service delay experienced without the requests-shaping function. So, a requests-shaping function using a larger window value could perform better. Figure 7 compares the service delays of the scenarios that use the request shaper against the service delays of the scenarios that do not use the request shaper; the comparison is done using a box plot representation: in the box the 25 th, the 50 th, and the 75 th percentiles are represented, respectively, the ends of the whiskers represent the 5 th and 95 th percentiles and the circles are the outliers. We can notice that especially for lower values of \(\lambda\) i.e., when \(\lambda=1/500\) ms\({}^{-1}\) or when \(\lambda=1/400\) ms\({}^{-1}\), the 25 th and 50 th percentile values obtained with the request shaper and without the request shaper are almost the same; but we can also notice from the 75 th and 95 th percentile values that with the request shaper the maximum experienced service delay decreases significantly (please note the log scale on the \(y\)-axis). Figure 6: Service delay CDF w/ and w/o the request shaper. Figure 7: Service delay box plot w/ and w/o the request shaper. In the second scenario under consideration, we tested different values for the maximum congestion window size. Figure 8 shows the cumulative distribution function of the service delay for different values of the congestion window size in the case of a rate \(\lambda\) equal to \(1/330\) ms\({}^{-1}\).