# Analysis of the Macroscopic Behavior of Server Systems in the Internet Environment
## 4 Experiments and Evaluation
### Service Scaling Based on the Proposed Measure  
Based on the results of previous experiments, to confirm the applicability of the proposed measure in the actual server system, we prototyped a function to detect a scenario in which the server system is falling into an overloaded state using the proposed measure. Specifically, a function to generate an alarm when the variance of the fluctuation of the OT of the server system is rapidly increasing was implemented and embedded into the experimental server system. In the experiment described in this section, it is verified whether the overloaded state of the service can be avoided by executing the scaling operation based on the alarm issued by the prototype system. The simple procedure of alarm generation used in this experiment is shown below. [Alarm generation procedure at discrete time point \(p\)]  
At discrete time point \(p\), the result of an observation is given by a time series of observed values; that is, \(\{var(0),var(1),\ldots,var(p-1),var(p)\}\), where \(var(0)=0\). The interval of the adjoining observed values, \(d_{p}\), is given by \(d_{p}\gets var(p)-var(p-1)\). \(H\) (\(H\geq 0\)) and \(C\) (\(C\geq 0\)) are predefined thresholds. Window size \(W\) (\(W\geq 0\)) is a predefined value. The score at time point \(p\), \(S_{p}\), is calculated in this procedure. At initial time point \(p=0\), \(d_{0}\gets 0\) and \(S_{t}\gets 0(-W\leq t\leq 0)\). **if**\(d_{p}\geq 0\)  
**then**\(S_{p}\gets 0\)  
**else**\(\{\)  
**if**\(d_{p-1}\geq 0\)**and**\(var(p-1)\geq H\)  
**then**\(\{S_{p}\gets 1\)  
**if**\(\text{sum}\big{(}S_{p-W},\ldots,S_{p}\big{)}\geq C\)**then**\"Generate Alarm\"\(\}\)  
**else**\(S_{p}\gets 0\)  
In this experiment, we set \(H\) = 200, \(C\) = 3, and \(W\) = 180. This is a setting to generate an alarm when a peak exceeding 200 is observed three times or more in the period of 180 s. When an alarm was generated, the service was scaled by connecting in parallel the replicated VM (CPU: 1.795 GHz 2 core, memory: 4.0 GB) via the load balancer. The server load was an average of 10 requests per second at the start time (0 s), and increased by one every 300 s. This is same as the setting for Experiment 2. Figure 10 shows the results of this experiment. Figure 10a shows the transition of the server load, Figure 10b shows the measured transfer rate, and Figure 10c shows the variance of the fluctuation of the transfer rate and the alert log. As shown in Figure 10b, even when the server load increased, the phenomenon that catastrophically decreased the transfer rate did not occur in this experiment. It can be seen that the transfer rate improved at the time points of approximately 1600 s and 3600 s, which is because the processing capability of the server system was reinforced by the scaling of the service. From Figure 10c, it can be confirmed that alerts were issued at the time point of approximately 1600 s (time point A) and 3600 s (time point B). By scaling the service based on the alert, the server system became stable and the variance of the fluctuation of the OT decreased. Figure 11 shows changes in system configuration during this experiment. At time points A and B, the service was scaled by connecting VMs, and the processing capacity of the server system gradually improved. As mentioned above, the improvement of the processing capacity of the service can be confirmed from Figure 10b. In Experiment 2, conducted under the same condition regarding the server load, the transfer rate decreased in the period of 1800-2099 s. By contrast, in this experiment, the prototype system detectedthe sign of the overloaded state of the service based on the proposed measure and avoided the server system becoming overloaded by executing a scaling operation in advance. Therefore, using the alarm generation function prototyped based on the proposed method, it is shown that the scaling operation was performed at an accurate time, and the overloaded state of the service could be avoided.