1 Introduction
-
A tuning model for controlling the resource allocation between business functions and adaptive computations by upgrading and degrading the autonomic levels of adaptive computations dynamically. The features and gains of adaptive computations have been taken into considered in the model.
-
We evaluate RSpring across a range of experiments with ECperf3 and RUBiS4 JEE benchmarks. The results show that RSpring is effective and efficient to support the performance of the whole JEE system, and in particular, our considerations of the features and gains of adaptive computations in model- and algorithm-design are valid.
2 Background and a motivating example
2.1 Adaptive computation
2.2 A motivating example
3 Tuning model
3.1 The features of an adaptive computation
Abstract function | Triggering | Tuning method |
---|---|---|
Monitor | Time driven; Tuner driven | Start/Stop |
Analyze | Time/monitor driven; Tuner driven | Start/Stop |
Plan | Analyzer driven; Tuner driven | Start/Stop |
Execute | Planner/analyzer driven; Tuner driven | Start/Stop, or tune the execution cost |
State | Definition |
---|---|
S0 | All the four autonomic functions in the control loop are stopped |
S1 | Only the monitor function is started |
S2 | S1 is true and the analyze function is started |
S3(E0) | S2 is true and if a change is necessary, the execute function is started |
3.2 The gain of an adaptive computation
4 The RSpring tuner
-
AC tuning is similar to process scheduling, but they have something in difference. First, process scheduling is to select a process to consume resources (e.g., CPU), while AC tuning is to degrade (i.e., return some of the possessed resources) or upgrade an AC (i.e., consume relatively more resources). Second, a process has only the states related to stop/start, while an AC may have more states (i.e., S0, S1, S2, and S3). Thus, the process scheduling algorithms are not readily applicable in our work.
-
Although some relatively complex AC tuning algorithms may be available, e.g., using feedbacks or Markov prediction, they usually cost much more runtime resources [26]. In a resource limited and competed environment, these resource-hungry algorithms should not be used, otherwise the whole system performance may become even worse [25, 26]. We have had tested the Markov prediction scheduling algorithm in a trial experiment. The results are not good enough because the runtime overhead brought about by prediction will offset the tuning effects. In addition, by referring to process scheduling, we find that all the scheduling algorithms are simple and effective. Our tuning algorithms are also inspired by them, which are representative, effective, and have a low overhead.
-
The mechanism behind these algorithms is the same: enable a flexible tradeoff between business functions and ACs by executing the latter dynamically when resources are limited and competed.
4.1 Two concerns in algorithm design
4.2 Algorithms in detail
4.2.1 Covered load-amortizing tune (CLAT): the default algorithm of RSpring
-
remainDeque: contains the ACs that have not been tuned since the last time the algorithm is executed.
-
changedDeque: contains the ACs that have been tuned since the last time the algorithm is executed.
-
A list of ACs with their current levels are all in S0 (see Sect. 3.1). These ACs have been sorted in descending order according to each AC’s gain value. All these ACs are copied to the remainDeque in sequence when initializing RSpring.
-
A system load metric (e.g., CPU utilization) and the corresponding thresholds: lowerBound and upperBound (e.g., CPU utilization between 75 % and 85 %).
-
getCurLoad
(metric
): get the current system load measured by the given metric. -
calibrateACPos
(tuningOperation
): adjust the position of each AC in between the remainDeque and the changedDeque according to an AC’s current level, gain value, and the tuning operation to be performed. This method is used to guarantee the tree tuning features of the algorithm. As described in Sect. 3.2, an AC can upgrade or degrade by itself without the control of RSpring when the state of the managed object exceeds its SafeRange, and thus may interfere with the three features. Therefore, calibration is necessary. -
inSafeRange
(AC
): given an AC, check if the state of the managed object is in its SafeRange. -
initialized
(AC
): check if an AC has been set to its initial level. -
tuning
(AC
,tuningOp
): upgrade, degrade, or initialize an AC. -
swap
(Deque a
,Deque b
): swap the given two deques.
4.2.2 Covered carry-through tune (CCTT)
-
Controlled by the tuner, an AC with a high gain value is upgraded before and degraded after those ACs with relatively low gain values.
-
Before an AC being upgraded by the tuner, each of the other ACs with higher gain values must have been upgraded to its highest level (e.g., S3), and all the other ACs with lower or equal gain values must not be tuned until the upgrading of the current AC to its highest level is finished; before an AC being degraded by the tuner, each of the other ACs with lower gain values must have been degraded to its lowest level (e.g., S0), and all the other ACs with higher or equal gain values must not be tuned until the degrading of the current AC to its lowest level is finished. This feature will not work when the SafeRange constraint of an AC is violated and meanwhile the results of the self level-changing conflict with the first feature.
-
isAtHighestLevel
(AC
): check if an AC has been set to its highest autonomic level. -
isAtLowestLevel
(AC
): check if an AC has been set to its lowest autonomic level.
4.2.3 Other algorithms
4.3 The implementation of RSpring
5 Evaluation
5.1 ECperf + PkuAS
5.1.1 Experimental setup
5.1.2 Performance of ECperf
-
The curves in Fig. 7(a) belong to the no-violation pattern. They have the following characteristics: (1) the TPA curve always decreases after and increases before the LP and RTM curves, while the RTM curve always behaves in the opposite way; (2) the TPA curve covers both the LP and RTM curves all the time, and the LP curve always covers the RTM curve; (3) in a round of tuning, the TPA curve will not increase/decrease to a new level once more until the other two curves have both increased/decreased. Thus, we see that these characteristics reveal and conform to the three tuning features of the CLAT algorithm in Sect. 4.2.×
-
The TPA curve in Fig. 7(b) shows that TPA has experienced the violation of its SafeRange constraint when txRate is 7 (during the timeline of the 25∼27 and 28∼29 minutes). In such a case, RSpring will stop tuning TPA for a fixed time interval (e.g., 30 seconds). TPA will automatically adjust the size of the thread-pool (i.e., its managed object) for getting back to its SafeRange, and thus it changes the autonomic level directly to S3 by itself as shown in this figure.
5.2 RUBiS + JOnAS
5.2.1 Experimental setup
Name | Description | AC level | Controlled classes |
---|---|---|---|
wm | It models a work manager, which is similar to the TPA of PkuAS. It allows efficient pooling of thread resources and controls over thread usage | S0, S1, S2, S3minLevel: S1 | JWorkManager JWorkManagerMBean |
audit | It is used to audit the ejb and web transactions | S0, S1 | AuditService AuditLogComponentMBean |
wc | It periodically cleans up the work directory | S0, S1, S2, S3 | JOnASWorkCleanerService WorkCleanerServiceMBean |
discovery | It periodically discoveries the JOnAS domain | S0, S1, S2 | DiscoveryService DiscoveryServiceMBean |
resourcemonitor | It periodically checks and reloads resources | S0, S1, S2, S3 | JOnASResourceMonitorService ResourceMonitorServiceMBean |
depmonitor | It monitors the application’s deployment process | S0, S1 | DeployableMonitorService |
versioning | It checks and redeploys applications | S0, S1, S2, S3 | VersioningServiceImpl VersioningServiceImplMBean |