# Providing Predictable Quality of Service in a Cloud-Based Web System
## 4 Experiments and Discussion
### Experiments  
To evaluate the experiments' results, different metrics were used--mean service time, 95 percentile, and 98 percentile of service time. One of the WCEDF method's main aims is to service the requests in a time shorter than the required value \(t_{max}\). The new proposed approach requires the application of an adequate quality factor, allowing evaluation of the most important features of the proposed method. The mean value of satisfaction was chosen. It is often used to evaluate the effect of the work of real-time soft systems. The value of satisfaction was calculated as follows:  
\[Satisfaction\left(\overline{t}\right)\ =\ \left\{ \begin{array}{c}1\text{ if } \overline{t_{i}}<t_{\max}^{s}\\ 0\text{ if }\overline{t_{i}}>t_{\max}^{h}\\ 1-\frac{t_{max}^{h}-\overline{t_{i}}}{t_{\max}^{h}-t_{\max}^{h}}\text{ in other cases}\end{array} \right. \tag{10}\]  
where \(t_{max}^{s}\) is the \"soft time\" after which satisfaction starts decreasing to 0 and \(t_{max}^{h}\) is the \"hard time\" after which the user will leave the page. Figure 5 presents the satisfaction in the service time function. In experiments, it was assumed that \(t_{max}^{s}\ =\ t_{max}\) and \(t_{max}^{h}\ =\ 2\cdot t_{max}\). Each experiment was conducted for different loads, measured as the number of simulated clients. The number of clients varied from 100 to 2500. Also, during a single experiment, 40 million HTTP requests were served. The warming phase was taking 10 million requests, and for 30 million, the service time was measured. The experiments were conducted for four adopted values of \(t_{max}\): 0.5 s, 0.75 s, 1 s, and 2 s. Figure 6 presents the results of experiments for \(t_{max}\ =\ 0.5\) s.  
As it can be seen in Figure 6, when the load of the system was low, the mean response time, the 95 percentile, and the 98 percentile were the lowest for the FNFN configuration. The FNFN configuration was very effective in minimizing HTTP request service times. When the load increased, the 95 and the 98 percentile became lower for the WCEDF strategy. This was especially noticeable in the case of the 98 percentile. The WCEDF strategy was able to keep the service time within constraints (\(\overline{t_{i}}<t_{max}\)) when the load was low and keep the time as low as possible when the load increased. The FNFN configuration in heavier loads had lower mean service times. However, there are also requests with long service times, which is noticeable on the 98 percentile graph. The same phenomenon can be seen on the cumulative distribution of the service time graph (Figure 6d), picturing results for the load of 2300 clients. About 80% of requests were serviced by the FNFN cloud in a time shorter than for the WCEDF method. However, the longest 20% of service times also belonged to the FNFN configuration, which indicates that the standard deviation was greater for the FNFN than for the WCEDF. The WCEDF method, in most cases, offered a longer mean service time, but the flow of requests was much more predictable, structured and in the end, there are not requests being serviced for a longer time. Figure 5: Satisfaction function. Figure 6: Results of experiments for \(t_{max}~{}=~{}0.5\) s. (**a**) Mean service time in load function (number of clients), (**b**) the 95 percentile of service time in load function, (**c**) the 98 percentile of service time in load function, and (**d**) the cumulative distribution of service time for a number of clients equal to 2300. Results obtained for classical configurations (LL, RR, and P) were much worse and differed significantly from intelligent solutions. Figure 7 presents graphs of satisfaction for different obtained times \(t_{max}\). As can be seen, the satisfaction was the highest for the WCEDF method, especially when the load was heavy. When the load was low, the measured satisfaction was high and close to 1 for each of the distribution strategies and methods in each experiment.