Moving Towards Self-Adaptive Systems: ML-Based Auto-Tuning in Middleware

A self-adaptive system has the ability to configure and reconfigure itself and continuously tune and optimize itself. Self-adaptive systems have been studied and solutions have been developed in a number of fields such as robotics, autonomic computing, control systems, distributed systems, and fault-tolerant computing. The main motivation for this work is to enable self-configuration into WSO2 products. Our products have various configuration parameters which we can tune to control the run-time behavior (performance, stability, etc.) of products. For example, the following table shows the (subset of) configuration parameters of the WSO2 stream processor.
The configuration parameters listed above have a direct impact on the performance of the Stream Processor. Although we have default values for these configuration parameters, these values may not guarantee the optimal operation (e.g. best performance) of the system (or the product) under all scenarios. The optimal configuration values will depend on many factors such as use case, traffic pattern, deployment pattern, hardware, and so on. Therefore, in order to achieve optimal operation, we may need to perform selective tuning. Such tuning may require significant effort in particular for large deployments that consists of multiple products. Furthermore, doing such specific optimizations may not always guarantee the optimal operation. The reason is that traffic patterns, use cases, hardware, etc. could change over time. When this happens, the system may no longer operate under its best-operating conditions. Auto-tuning will eliminate the need for finding optimal configurations and enable the system to adapt to changing conditions.
Our primary objective is to come up with architectures and algorithms that can learn the behavior of a system on-line (i.e. on-the-fly) and self-adjust the parameter values to optimize certain objectives (or criteria). At a higher level, we can represent the architecture of the self-adaptive system using the following diagram using control theory.
As we can see, this model is similar to the generalized feedback control loop in industrial control systems. The feedback loop takes the system output into consideration, which enables the system to adjust its behavior to meet the desired objective. Here the objective can be a single objective (e.g. maximize throughput or minimize latency) or multi-objective (e.g. maximize throughput and minimize latency). One might wonder how it is possible to optimize both throughput and latency (at once) as the objective functions of throughput and latency are (generally) conflicting (i.e. as the throughput increases the latency also increases).


