ARTICLE IN PRESS
Control Engineering Practice 15 (2007) 1457–1467 www.elsevier.com/locate/conengprac
An LPV approximation for admission control of an internet web server: Identification and control Wubi Qin, Qian Wang Department of Mechanical Engineering, The Pennsylvania State University, 325 Leonhard Building, University Park, PA 16802, USA Received 21 March 2006; accepted 14 February 2007 Available online 6 April 2007
Abstract There has been increasing research effort in applying control-theoretic approaches to performance management for computer systems such as Internet web servers, databases and storage systems. Since today’s Internet servers and applications are often operated under dynamically changing load conditions, linear control designs may not suffice to provide desired performance guarantees. This motivates nonlinear system modeling and control design methodologies. This paper studies the admission control for an Internet web server. It presents a linear-parameter-varying (LPV) approximation for the modeling of the dynamic relationship from the request rejection ratio to the response time for the admitted requests. The time-varying workload parameter, in particular the workload intensity, is specified as the scheduling variable that is used to parameterize the LPV model. An LPV system identification algorithm is applied to derive the empirical model, and then an LPV-H 1 controller is designed to provide response time guarantees. The performance of the resulting LPV control compares favorably to that of a linear design. The utilization of scheduling parameters can be generalized to accommodate more sophisticated workload characterizations and more complicated server environments. By exploring the nature of dependence of server performance on time-varying load and operating conditions, the proposed general framework is possibly applicable to a diverse spectrum of server-based applications. r 2007 Elsevier Ltd. All rights reserved. Keywords: Admission control; LPV system identification and control
1. Introduction Today’s web applications are often housed on an Internet data/hosting center. A guaranteed level of performance, which is referred to as quality of service (QoS) delivered to end customers, is often part of a servicelevel agreement (SLA) between the service provider and an end user. QoS can be characterized by system availability and performance criteria such as response time and throughput, where response time is often a primary concern for performance control of computer servers. For an incoming traffic of requests, a server system (or server cluster) could use different mechanisms to achieve desired values of performance metrics. For instance, admission control is a way to shape the incoming traffic by denying certain requests into the system so that the Corresponding author. Tel.: +1 814 8658281; fax: +1 814 8659693.
E-mail address:
[email protected] (Q. Wang). 0967-0661/$ - see front matter r 2007 Elsevier Ltd. All rights reserved. doi:10.1016/j.conengprac.2007.02.006
response time of admitted requests can be guaranteed. Another mechanism is to determine available resources (CPU, memory, and I/O bandwidth) that a particular application can access, which leads to the resource allocation problem. The demand on automating the performance management of computer servers to adapt to dynamically changing load conditions strongly motivates feedback-based control mechanisms for admission control and resource allocation. In addition, control-theoretic approaches allow the design to modulate system transient behavior, while traditional queueing-theory-based analysis focuses on the steady state of the system. There has been increasing research effort in applying control-theoretic approaches to the performance management of Internet-server systems such as email (Parakh, Gandhi, Hellerstein, Tilbury, & Bigus, 2001), storage (Lu, Guillermo, & Wilks, 2002) and web servers (Abdelzaher, Lu, Zhang, & Hennksson, 2004; Diao, Gandhi, Hellerstein, Parekh, & Tilbury, 2002; Hellerstein,
ARTICLE IN PRESS 1458
W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
Diao, & Parekh, 2002; Robertsson, Wittenmark, Kihl, & Andersson, 2004) (see the survey paper by Abdelzaher, Stankovic, Lu, Zhang, & Lu, 2003 and references therein). Most of the existing literature on control-theoretic approaches for performance management of Internet server systems adopted system identification techniques to build linear-time-invariant models, based on which linear controllers (often PID controllers) were designed (see the survey paper by Abdelzaher et al., 2003). One major concern with these linear-time-invariant modeling and control designs is that they do not capture system nonlinearity, noting that the dynamics from control variables (e.g., request rejection ratio or resource allocation variables) to response time are generally nonlinear. Though a linear model can be viewed as the linearization of the original nonlinear system at a nominal operating/load condition, the resulting linear design may not suffice to provide response time guarantees when there are large variations in load conditions. In the current literature, there is no rigorous robustness analysis for such linear designs with respect to load variations. In order to deal with time-varying workloads, Lu, Abdelzaher, Lu, and Tao (2002) developed an online-identified linear model for the performance control of differentiated caching services using a recursive least-squares method, and then designed an adaptive controller. In Diao, Hellerstein, and Parakh (2002), a fuzzy-logic control was applied to optimize performance for the Apache web server. This paper presents a Linear-Parameter-Varying (LPV) approach for the modeling and control design for the admission control of an Internet web server. Compared to linear modeling, the LPV approximation parameterizes the system model by specifying load conditions as scheduling variables, and the resulting controller is parameterized by load conditions as well. Therefore, the LPV modeling and control allow the system to adapt to the variation of load and operating conditions more efficiently than the linear modeling and designs. Another advantage of the LPV control design is that it does not need a priori information on the load condition as long as the workload statistics are on-line measurable for implementation. Compared to the on-line identified model used in the adaptive control in Lu, Abdelzaher et al. (2002), the LPV modeling provides more explicit characterization of the dependence of model coefficients on load conditions, which is modeled in the form of linear-fractional-transformation (LFT) or polynomial dependence. For the admission control problem, this paper considers an Internet web server that needs to serve the HTTP requests of a large number of clients. It is assumed that the resource capacity is not enough to process all requests to meet the response time SLA. Therefore, certain incoming requests have to be rejected to enter the system in order to provide response time guarantees for the admitted requests. This process can also be interpreted from the economic perspective of the web service provider. Admitting too many requests that exceed the system capacity will
inevitably cause performance degradation for the admitted requests, which could lead to violating specified SLAs, thus bring penalty to the web service provider. On the other hand, rejecting requests will make the service provider lose the possible revenue of serving these requests. Consequently, corresponding to time-varying load conditions, the web service provider needs to dynamically determine whether to admit or deny an incoming request in order to meet target response time for the admitted requests. Optimal control has been applied to admission control in the area of communication network systems in many references, where the arrival is often modeled as a stochastic process; for example, Kuri and Kumar (1995) studied the admission control of a queueing system with geometrically distributed inter-arrival and service times. Linear optimal controllers such as linear-quadraticGaussian (LQG) regulators have been applied to network congestion control as well, e.g., in Altman, Basar, and Srikant (1999), the service rate (which is the available bandwidth capacity) is modeled by a p-dimensional stable Auto Regressive (AR) process thus an LQG controller can be applied. In Andersson, Kihl, and Robertsson (2003) and Robertsson et al. (2004), by considering controller saturation and non-negativity of queue length, a PID-based controller was designed for the admission control of M/G/ 1 (a single-server queueing system with exponentially distributed inter-arrival time and general service-time distribution) and G/G/1 (a single-server queueing system with both general inter-arrival and service-time distributions) systems. A major distinction between the current paper and the above-mentioned references (including Delli Priscoli & Isidori, 2005) lies in that adaptation to timevarying load conditions is the major concern of this paper, while a fixed mean arrival rate (or fixed mean service rate) is often assumed in the above-mentioned papers. By recognizing the dependence of system dynamics on time-varying load conditions, this paper first builds a LPV model using system identification algorithms, where workload intensity is specified as the scheduling variable. Then based on the identification model, an LPV robust controller is designed for admission control in achieving target response time. The performance of the LPV control is compared to that of a linear design through simulations using multiple workloads. This paper shows that the LPV modeling and control provide significant improvement in stability and performance by utilizing detail load information. The paper is organized as follows. Section 2 introduces the problem formulation. The LPV system identification and control design are presented in Sections 3 and 4, respectively. Simulation results are given in Section 4, and conclusions follow at the end. 2. Problem formulation A typical web application consists of a front-end web server that services HTTP requests, a Java application
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467 k,e n arriv Admission Control Requests admitted Arrivals k,i n arriv
Requests rejected
Waiting Queue
Server Departures Dispatching requests
Fig. 1. Admission control for a single queue.
server that contains the application logic, and a backend database server. A simple web service with a single web server is illustrated in Fig. 1. When a request arrives, the admission control determines if it is admitted or rejected. If admitted, the request is directed into a queue to the server and waits to be served. This paper considers the case where requests will be served in a first-come, first-serve (FCFS) manner. A workload is usually characterized by two complementary distributions: the inter-arrival time distribution and the service demand distribution. Let li ðkÞ denote the mean arrival rate of incoming requests in a sampling period, which is the inverse of the mean inter-arrival time, and let mðkÞ denote the mean service rate, which is defined as the inverse of the mean service time. The control algorithms for admission control can be implemented either at request level or window based. For a request-level control, the algorithm directly determines whether to admit the next request in a queue or simply reject it so that the response time of each admitted request can meet the target value. For a window-based control, a two-step procedure is needed. First, a sampling period (time window) is chosen. In each sampling period, based on average statistics of the requests arriving in this sampling period, e.g., the mean arrival rate li ðkÞ and mean service time, the control algorithm decides an uðkÞ (which holds constant in a sampling period) so that the average response time within each sampling period meets the target value for all the sampling intervals. Noting that the average workload statistics are only available at the end of the kth sampling period, the measured statistics in the previous ðk 1Þth sampling period is often used as prediction for the workload statistics at the kth period for the design of uðkÞ. There are different choices of the decision variable uðkÞ, e.g., one could choose uðkÞ as the maximum number of requests that are allowed to enter the system in a sampling period, or one could choose uðkÞ as the average rejection ratio yðkÞ in a sampling period. This paper defines the control-algorithm decision variable using the latter. Second, in each sampling period, after the rejection ratio yðkÞ is determined by the control algorithm, an incoming request is admitted to the system with probability (1 yðkÞ) (or it is denied to enter the system with probability yðkÞ). This can be implemented using a random number generator (biased coin tossing). Let le ðkÞ denote the mean arrival rate for the requests that are admitted into the system, which is hereinafter referred to as the effective arrival rate.
1459
The performance metric is specified as the average response time of the admitted requests in each sampling period and denoted by TðkÞ, which needs to meet the target value T¯ with a minimal number of requests getting rejected. Consequently, the admission control is performed by dynamically deciding the rejection ratio yðkÞ for the incoming traffic such that the target response time T¯ can be guaranteed for the admitted requests. In the formulation of a feedback control loop for the admission control problem, specify the rejection ratio yðkÞ as the control input variable and the response time TðkÞ as the system output variable. Then a dynamic model from the input yðkÞ to the output TðkÞ needs to be derived. Consider a fluid model (which ignores the nonlinearity caused by non-negativity of the number of jobs in the system): N s ðk þ 1Þ ¼ N s ðkÞ þ le ðkÞDt mDt ¼ N s ðkÞ þ li ðkÞð1 yðkÞÞDt mðkÞDt, TðkÞ ¼ N s ðkÞ=mðkÞ,
ð1Þ (2)
where N s ðkÞ denotes the number of jobs in the system at time kDt. The first equation denotes that the number of jobs in the system at ðk þ 1ÞDt equals the sum of the initial number of jobs in the system at kDt and the number of arrivals (le ðkÞDt) minus the number of requests being serviced in [kDt,ðk þ 1ÞDt] (mDt). The second equation is an approximation of Little’s law. This fluid model can be rewritten in the input–output form as i mðkÞ l ðkÞ TðkÞ Dt yðkÞ Tðk þ 1Þ ¼ mðk þ 1Þ mðk þ 1Þ þ
li ðkÞ mðkÞ Dt. mðk þ 1Þ
ð3Þ
Noting that coefficients of this input–output model are functions of workload parameters, li ðkÞ and mðkÞ (mðk þ 1Þ), Eq. (3) is a LPV model scheduled by load conditions. Inspired by Eq. (3), LPV system identification algorithms are applied in Section 3 to directly identify dynamic models for admission control, where the workload intensity of the incoming traffic, li ðkÞ=mðkÞ, is used as a scheduling variable for the LPV model. Remark 1. The fluid model in Eq. (3) essentially characterizes the dynamics from rejection ratio to the mean response time in each sampling period only in terms of mean arrival rate and mean service rate, and no variance information of the workload has been taken into account. It is noted that in general, the response time depends not only on the mean rate information of workload distributions, but could also depend on the variance of request inter-arrival time and variance of service demand, or even higher moments of the arrival and service demand distributions. By directly identifying an LPV model from empirical data, though only mean arrival rate and service rate were chosen as scheduling variables in this paper, coefficients of the LPV model (a1i ; a2i ; . . . ; aN i , i ¼ 1; 2; . . . ; na ; b1j ; b2j ; . . . ; bN , j ¼ 1; 2; . . . ; n in Eq. (10) of b j
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
1460
Section 3.2) should implicitly depend on the workload distributions more than just mean rate information. Therefore, compared to Eq. (3), which is restricted to mean values of workload distributions, system-identification-based models presented in the next section have no such restrictions and will provide a more general structure for system modeling. Remark 2. Considering an incoming workload with exponentially distributed inter-arrival time and exponentially distributed service time, i.e., it follows the M/M/1 (a single-server queueing system with exponentially distributed inter-arrival time and exponentially distributed service time) queuing model, then the mean response time (the steady-state value over a sufficiently long time period) can be calculated in terms of the mean arrival rate le and mean service rate m as follows: T¼
1=m . 1 le =m
Different formulae for calculating mean response time for the M/G/1 and the G/G/1 queuing models are available in the literature as well (e.g. Bolch, Greiner, de Meer, & Trivedi, 1998). The results of this paper’s LPV modeling and control design will be compared to these steady-state queueing results in Section 5.2. 3. LPV system identification of admission control for an Internet web server 3.1. Linear ARX model A linear time-invariant model is first constructed for admission control using system identification techniques. This linear model is used to characterize the dynamic relation from the rejection ratio yðkÞ to response time of the admitted requests TðkÞ corresponding to a specific operating condition. It is assumed that the dynamics can be approximated by an ARX model as follows: AðqÞTðkÞ ¼ BðqÞyðkÞ þ eðkÞ
(4)
with AðqÞ ¼ 1 þ a1 q1 þ þ ana qna ,
(5)
BðqÞ ¼ b1 q1 þ þ bnb qnb ,
(6)
where q is the delay operator and na and nb determine the system order. The constant coefficients ai and bi are computed through running system identification algorithms on collected experimental data ðyðkÞ; TðkÞÞ. 3.2. LPV-ARX model In order to characterize the adaptation to time-varying load conditions, a LPV system is formulated by defining workload parameters as scheduling variables. In particular, this section models the dependence of system dynamics on exogenous time-varying load parameters (e.g., request
arrival rate and service demand) whose trajectories are unknown a priori but can be measured on-line. Assuming that the coefficients ai and bi in Eqs. (5)–(6) are functions of load conditions, which are represented by the vector r, specify the system dynamic equation as follows: Aðq; rÞTðkÞ ¼ Bðq; rÞyðkÞ þ eðkÞ,
(7)
where Aðq; rÞ ¼ 1 þ a1 ðrðk 1ÞÞq1 þ þ ana ðrðk naÞÞqna , (8) Bðq; rÞ ¼ b1 ðrðk 1ÞÞq1 þ þ bnb ðrðk nbÞÞqnb .
(9)
The coefficients ai ðrÞ; i ¼ 1; . . . ; na, bj ðrÞ; j ¼ 1; . . . ; nb are functions of rðkÞ, whose explicit mathematical expressions will be discussed later in this section. The model in Eqs. (7)–(9) is referred to as the LPV-ARX model. In general, rðkÞ in Eqs. (7)–(9) could be a vector including all workload-characterizing parameters, e.g., arrival rate, service demand, locality and sequential/ random access pattern, etc. This paper begins with a single scheduling variable, workload intensity, which is defined as the ratio of mean arrival rate of incoming requests, li ðkÞ, and mean service rate mðkÞ, i.e., rðkÞ ¼ li ðkÞ=mðkÞ. Given the on-line measurements of request arrival and service demand, rðkÞ can be easily computed in real time. In addition, since the traffic load is often considered to vary in a much slower time scale (usually in minutes for a web application) compared to the system dynamics (where the response time for a web request is in seconds), the LPV system in Eqs. (7)–(9) is slow varying, which satisfies conditions for a general LPV control design in Apkarian and Gahinet (1995), Apkarian, Gahinet, and Becker (1995). In Eqs. (7)–(9), the functional dependence of coefficients ai ðrÞ; i ¼ 1; . . . ; na, and bj ðrÞ; j ¼ 1; . . . ; nb on the load parameter rðkÞ could be nonlinear in general. In the existing literature for LPV system identification, it is often assumed that the system plant has a LFT dependence on the scheduling variables (Lee & Poola, 1999; Sznaier & Mazzaro, 2003), or that the scheduling variables enter the model coefficients in a polynomial manner (Bamieh & Giarre, 2002; Giarri, Bauso, Falugi, & Bamieh, 2006). Under such assumptions, a naive approach for estimating the LPV-ARX coefficients ai ðrÞ; i ¼ 1; . . . ; na and bj ðrÞ; j ¼ 1; . . . ; nb can be conducted as follows: (1) identify a set of linear time-invariant ARX models (as Eqs. (4)–(6)) corresponding to a sequence of values of r, (2) then derive ai ðrÞ; i ¼ 1; . . . ; na, bj ðrÞ; j ¼ 1; . . . ; nb by interpolating the corresponding coefficients of the linear time-invariant ARX models. The LPV system identification algorithm used in this paper is based on the least-mean-squares algorithms from Bamieh and Giarre (2002), where the LPV plant is assumed to have polynomial dependence on the scheduling parameters. Assuming that the function ai ðrÞ, i ¼ 1; . . . ; na and bj ðrÞ, j ¼ 1; . . . ; nb in Eqs. (8)–(9) are polynomials of the
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
load intensity r of order N 1, i.e., N1 ai ðrÞ ¼ a1i þ a2i r þ þ aN , i r N1 bj ðrÞ ¼ b1j þ b2j r þ þ bN . j r
Define a coefficients 2 1 a1 6 . 6 .. 6 6 1 6 ana 6 Y¼6 1 6 b1 6 6 . 6 .. 4 b1nb
ð10Þ
ðna þ nbÞ N matrix Y that contains all the to be identified 3 . . . aN 1 .. 7 .. . 7 . 7 7 7 . . . aN na 7 (11) N 7 . . . b1 7 7 .. 7 .. . 7 . 5 . . . bN nb
and define an extended regression operator Ck that consists of the input/output data and the parameter trajectories: 3 2 Tðk 1Þ 7 6 .. 7 6 . 7 6 7 6 6 Tðk na Þ 7 7 6 Ck ¼ 6 (12) 7½1 rðkÞ rN1 ðkÞ. 6 yðk 1Þ 7 7 6 7 6 .. 7 6 . 5 4 yðk nb Þ Then the least-mean-squares algorithm in Fig. 2 is used to ^ iteratively. This algorithm does compute the estimate Y not require that the scheduling variable be slow varying, but requires the persistence of excitation for the inputs and scheduling parameters. The experimental design and simulation results for the LPV system identification are presented in Section 5. Remark 3. As discussed in Remark 1, note that the LPV model proposed in Eqs. (7)–(10) has explicit polynomialdependence on the workload intensity (which is the ratio of mean arrival rate and mean service rate). However, no explicit dependence of the LPV model on higher moments (e.g., variance of arrival and service demand) of workload distributions is investigated, though the LPV system identification does not preclude implicit dependence on them. One possible improvement to the model in Eqs. (7)–(10) is to explicitly include the higher moments of
Least-Mean-Squares Algorithm: ˆ 0, 1) Initialize the estimated Θ ˆ TΨ) 2) k ← y (k) trace (Θ k k ˆ ˆ 3) Θ k+1 ← Θk + k Ψk Fig. 2. A least-mean-squares algorithm for identification of a polynomial parameter-dependent LPV system, where a is a design parameter.
1461
workload arrival and service distributions in the scheduling variables for the LPV modeling, e.g., specify scheduling parameters to include not just workload intensity, but also coefficients of variance (COV) of inter-arrival time and service demand. For certain types of server systems, particularly for storage systems, the response time could also depend on the request access pattern such as random accesses or sequential accesses, then the proposed LPV model can be generalized to include a parameter that characterizes the request access pattern into the scheduling variables. In general, for a particular class of workloads, by identifying an appropriate set of characterizing parameters and then including them into the scheduling parameters, the proposed LPV modeling and control design provide a flexible and effective framework for performance management. One limitation of identifying the LPV models in this paper is that polynomial dependence on the scheduling variables is currently assumed. This assumption allows the reduction of complexity in both system identification and controller design, but brings approximation errors to the possibly nonlinear dependence of system dynamics on load conditions in a real system. In addition, the increase in the dimension of scheduling parameters would also inevitably increase the computational complexity of system identification and controller design. Therefore, exploration of the effect of nonlinear functionality of the system model on load parameters from an analytical perspective would provide insights for improving the system-identificationbased LPV modeling, and it may also reduce the search space for identifying coefficient parameters of the LPV models. A hybrid modeling approach that combines both analytical modeling from first principles and system identification could be a promising direction. Remark 4. The major advantage of the LPV model in Eqs. (7)–(10) is that it explores the explicit dependence of the system model on the time-varying load conditions. Section 5 starts with verifying that for a fixed load condition, a linear ARX model (Eqs. (4)–(6)) is able to capture the dynamics between rejection ratio and response time reasonably well. The objective of designing a performance control scheme that can adapt to time-varying load conditions strongly motivates the parameterization of the performance dynamic model and the resulting controller using workload parameters. This fits the general framework of an LPV system exactly. In addition, the workload parameters are on-line measurable but not known a priori, and compared to the time constant of the system dynamics for response time, workload parameters are considered slow-varying parameters. All these aspects make the LPV approximation of the performance control of web servers very appealing. It is also worth noting that a general nonlinear system x_ ¼ f ðxÞ þ gðxÞu can always be approximated by a quasi-LPV system, x_ ¼ AðxÞx þ gðxÞu, which brings additional motivation of the proposed LPV
ARTICLE IN PRESS 1462
W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
modeling and control design for web server performance management. In the existing literature for performance management, an adaptive controller was designed for the performance control of differentiated caching services (Lu, Abdelzaher et al., 2002), where an online identified linear model was built using a recursive least-squares algorithm. A fuzzylogic control is used to optimize performance of an Apache Web server in Diao, Hellerstein et al. (2002). Compared to the adaptive control, the LPV modeling provides more explicit characterization of the dependence of model coefficients on load conditions, which is modeled in the form of LFT or polynomial dependence. Thus it could be potentially combined with existing work on workload characterization to achieve more accurate modeling and improved performance control. The fuzzy-logic control is an artificial-intelligence-based approach, which is often lacking in rigorous theoretical proof on stability and quality of solution. Model predictive control (MPC) (also referred to as receding horizon control) could be a promising approach to deal with unanticipated workload changes. Nevertheless, in order to apply the model predictive control, a dynamic model is needed as well. The MPC widely used in current control applications often deals with a linear model and a quadratic cost function (e.g., the MATLAB/MPC toolbox) for manageable computational complexity. In order to achieve an adaptation to time-varying load conditions, it is better to update the linear model (if a linear model is used in optimization during each horizon) from time to time. Therefore, the challenge of obtaining and updating a dynamic model still exists for the MPC control. One possible direction for future research could be combining the proposed LPV modeling with the MPC control, but careful investigation is warranted to find out if any performance improvement actually results from the additional computational complexity brought by this combination. 4. LPV robust control design Based on the LPV-ARX model in Eqs. (7)–(10), the admission-control rejection ratio yðkÞ is dynamically modulated by designing an LPV robust control so that ¯ The the response time TðkÞ will meet the target value T. LPV control can be classified as a generalized gainscheduling control. As illustrated by Fig. 3(a), it designs a parameter-dependent controller KðrÞ to stabilize the closed-loop system for all admissible parameter trajectories rðkÞ, minimizing the effect of the exogenous input w on the controlled variable z in certain norms (e.g., H 1 norm for an LPV-H 1 control formulation). The augmented plant Paug ðrÞ includes the actual LPV plant PðrÞ (e.g., Eqs. (7)–(10)) to be controlled as well as auxiliary weighting functions that are specified for closed-loop performance criteria. Fig. 3(b) shows the block diagram of an LPV control with LFT dependence on the scheduling para-
b Paug(r) r LTI Paug
z
a
y
y
u LTI K
w
z
w
Paug (r)
r
u K(r)
K (r)
Fig. 3. (a) Block diagram for LPV control structure. (b) Block diagram for LPV control with LFT structure.
Ze We Target response time T
Wu
Zu
u = (k) T = response time
e K(r)
P(r)
Fig. 4. Control design block diagram.
meters designed for an LFT-parameter-dependent plant, for which the controller design is often reduced to solving a set of parameter-dependent linear matrix inequalities (LMIs) (Apkarian & Gahinet, 1995). As a special case, the affine-parameter-dependent LPV control was addressed in Apkarian et al. (1995). For an LPV system with polynomial dependence on scheduling variables, a sum-ofsquares-based approach was presented by Wu and Prajna (2004) for control synthesis. An LPV-H 1 control design problem is formulated as shown in Fig. 4, where the performance specifications on minimizing tracking error of meeting target response time and reducing rejection ratio are addressed through the design of weighting functions W e and W u , respectively. In order to apply the LPV-H 1 control algorithms from Apkarian and Gahinet (1995) and Apkarian et al. (1995), a low-pass filter is appended to the input channel of the LPV plant PðrÞ in Eqs. (7)–(10). The bandwidth of the low-pass filter should be much higher than the feedback sampling frequency so that the system performance will not be affected. With a slight abuse of notation, let PðrÞ denote the LPV model that includes the original plant in Eqs. (7)–(10) plus the input low-pass filter. The controller KðrÞ is designed so that the closed-loop system is stabilized and the H 1 -norm of the transfer function T zw defined from the exogenous input w (which is the target response time T¯ here) to the controlled variable z (which consists of the weighted error signal ze and the weighted control signal zu ) is minimized, i.e., jjT zw jjpg, with a performance level g.
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
5. Simulation and evaluation results
1463
Measured Output and Simulated Model Output 0.025 Measured Output Predicted
5.1. Validation of the LPV system-identification model 0.02
Prefiltered response time
0.015
0.01
0.005
0
-0.005
-0.01 0
500
1000
1500
2000
time (x50 sec) x 10-3 10 Measured Output Predicted 8 6 Prefiltered response time
In this section, the LPV-ARX model Eqs. (7)–(10) is identified and studied how well the model would fit the empirical data. The system identification is based on a set of synthetic workloads running on computer simulation, which is implemented on top of the CSIM simulation package (Schwetman, 1990). For the synthetic workloads, the inter-arrival time follows an exponential distribution with mean arrival rate li ðkÞ in the kth sampling period and the request service time follows an exponential distribution as well, with mean service rate mðkÞ in the kth sampling period. Without loss of generality, the mean service rate mðkÞ is fixed to be a constant value that equals 100 requests/ s, and manipulate the workload intensity rðkÞ by varying the incoming arrival rate li ðkÞ. Note that though exponential distributions are used here for generating synthetic workloads, the proposed LPV modeling does not preclude using any other distributions. After requests are admitted to the system, they are served in a FCFS. The response time of each request is computed as the sum of its waiting time and service time. Before applying LPV system identification, the linear time-invariant ARX model in Eqs. (4)–(6) is first examined at a nominal load condition: It is intended to evaluate whether a linearized model at the nominal load condition is able to capture system dynamics when the load variation is small. For a synthetic workload with intensity r ¼ 0:5, mean service rate m ¼ 100 requests=s, and exponentially distributed inter-arrival time and service time, a pseudorandom binary signal (PRBS) is used to generate the rejection ratio yðkÞ. Then in terms of this rejection ratio yðkÞ along with the resulting response time TðkÞ, a secondorder ARX model is identified as follows:
4 2 0 -2
Tðk þ 2Þ ¼ 0:01938 Tðk þ 1Þ 0:01747 TðkÞ ð13Þ
-4
Second-order to fifth-order ARX models have been examined, and it is noted that the data fitting does not get much improved by increasing the order of the model (the loss function decreases by less than 10%). Fig. 5(a) plots the response time TðkÞ predicted by the ARX model in Eq. (13) versus that generated from the simulation with respect to the same pseudo-random binary rejection ratio yðkÞ. For model validation, Fig. 5(b) shows the ARX model-predicted response time against the simulation values corresponding to a multiple-step rejection ratio (which is different from the PRBS signal used in deriving the system identification model Eq. (13)). It is observed that a linear ARX model is able to capture the system dynamics at a nominal load condition. Next the LPV system identification algorithm in Fig. 2 is applied to estimate the coefficients ai ðrÞ, i ¼ 1; . . . ; na and bj ðrÞ, j ¼ 0; . . . ; nb of the LPV model in Eqs. (7)–(10). A
-6
0:01027 yðk þ 1Þ þ eðk þ 2Þ.
0
50
100
150
200
250
300
350
400
time (50x sec) Fig. 5. ARX model-predicted response time versus that generated from simulation corresponding to (a) a pseudo-random binary rejection ratio, and (b) multiple-step rejection ratio. Both (a) and (b) are evaluated at workload intensity r ¼ 0:5. The input/output data are prefiltered/ detrended data.
PRBS is used to generate the rejection ratio yðkÞ and a random signal is used to generate the scheduling parameter, which is the workload intensity rðkÞ. The time histories of these two signals are plotted in Fig. 6(a) and (b). By running the least-mean-squares algorithm from Fig. 2 on this ðyðkÞ; rðkÞÞ and the resulting TðkÞ from simulation, the following LPV-ARX model that has affine dependence
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
1464
1 Workload intensity r(t)
Rejection ratio u(t)
1 0.8 0.6 0.4 0.2 0
0.8 0.6 0.4 0.2 0
0
500
1000
1500
2000
0
time (x50 sec)
1000
1500
2000
time (x50 sec)
c
d 1 Workload intensity r(t)
1 Rejection ratio u(t)
500
0.8 0.6 0.4 0.2 0
0.8 0.6 0.4 0.2 0
0
500
1000
1500
2000
time (x50 sec)
0
500
1000
1500
2000
time (x50 sec)
Fig. 6. Input and scheduling parameter trajectories used in LPV system identification and model validation. (a) A pseudo-random binary signal used to generate rejection ratio in system identification; (b) a random signal used to generate workload intensity rðkÞ as scheduling parameter in system identification; (c) a different pseudo-random binary signal used for rejection ratio in model validation; (d) a different random signal used for workload intensity rðkÞ in model validation.
on workload intensity rðkÞ is derived: Tðk þ 2Þ ¼ ½0:3464 þ 0:1313 rðk þ 1Þ Tðk þ 1Þ þ ½0:2527 þ 0:1187 rðkÞ TðkÞ þ ½0:0007 þ 0:0443 rðk þ 1Þ yðk þ 1Þ þ eðk þ 2Þ.
ð14Þ
To validate the identified LPV model in Eq. (14), a different set of rejection ratio and workload intensity trajectories (from those used in the system identification experiment) is used. This set of data is shown in Fig. 6(c) and (d). Then the resulting LPV model-predicted response time (using Eq. (14)) and the response time generated from the simulation experiment are plotted in Fig. 7 for comparison. It is observed that the identified LPV model fits the data quite well. 5.2. Control design results The admission control is performed by dynamically deciding the rejection ratio yðkÞ such that the admitted ¯ with a requests can achieve the target response time T, minimal number of requests being rejected. Essentially the admission control has to balance between achieving the target response time and maintaining certain system
throughput. Rejecting all requests would definitely put the response time to zero, but the service provider would not make any money through serving requests either. For the synthetic workloads used in this paper, the target response time T¯ is specified as 0.02 s. A linear-quadratic (LQ) regulator is first designed based on the ARX model in Eq. (13) (which is identified at the nominal workload condition with intensity r ¼ 0:5). In order to minimize the steady-state error in meeting target response time, an integrator is appended at the control input. Fig. 8 shows the performance of this LQ design which operates at the design point (workload intensity r ¼ 0:5) and at the offdesign load condition (r ¼ 0:8). It is observed that the LQ design is able to achieve the 0.02 s target response time at r ¼ 0:5, but when the traffic load increases to r ¼ 0:8, it converges to a response time around 0.03 s and does not meet the target value. For the LPV-H 1 robust control formulation, the weighting functions W e and W u in Fig. 4 are chosen to reduce tracking error and peak control action. W e is designed to emphasize low-frequency tracking and to minimize steady-state error, and W e is designed to penalize high-frequency actuator activity. A trial-and-error search has been conducted for the weighting functions to satisfy jjT zw jjpg with go 1. A suitable set of weighting functions
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
1465
0.16
0.16 0.14
r=0.5 r=0.8
0.14
Measured Predict response time (sec)
Response time (sec)
0.12
0.12 0.1 0.08 0.06
0.1 0.08 0.06 0.04
0.04 0.02
0.02 0 0
0 0
500
1000
1500
2000
time (x50 sec)
Measured Predicted
0.16 LQ LPV
0.14
0.08
0.12 response time (sec)
Response time (sec)
time (x50 sec)
Fig. 8. Response time histories obtained by an LQ controller (design based on the nominal ARX model in Eq. (13)), which is operated under the nominal load r ¼ 0:5 and the off-design load r ¼ 0:8.
0.12 0.1
200 400 600 800 1000 1200 1400 1600 1800 2000
0.06 0.04 0.02
0.1 0.08 0.06 0.04
0 0
100
200
300
400
500
600
700
800
time (x50 sec)
0.02 0 0
Fig. 7. Validation of the identified LPV system model. (a) LPV modelpredicted response time versus that generated from simulation, corresponding to the rejection ratio and workload intensity given in Figs. 6(c) and (d); (b) zoom-in of (a).
200 400 600 800 1000 1200 1400 1600 1800 2000 time (x50 sec)
Fig. 9. Response time histories obtained by an LQ controller versus that obtained by an LPV controller, both of which operate under the load r ¼ 0:8.
in s-domain has been chosen as follows: We ¼
0:1429s þ 0:4 ; s þ 0:02
Wu ¼
0:1s2 þ s þ 2:5 . 0:2s2 þ 44:72s þ 2500
(15)
In Fig. 9, the performance obtained by the LPV controller operating at workload intensity r ¼ 0:8 is compared with that of the LQ controller running under the same load condition. The LPV controller is able to achieve the 0.02-s target response time at the off-nominal load condition. Fig. 10 compares the performance of the LPV controller against that of the LQ design for a timevarying workload. It is noted that the LQ design only provides a response time guarantee for the nominal load or less intensive traffic, but the response time increases dramatically for the heavy traffic. In comparison, the LPV design adapts very well to the change of workload
intensity and provides the response time guarantee despite the dynamically changing load conditions. In terms of the M/M/1 queueing model reviewed in Section 2, the mean response time T (steady-state value) equals 0.02 s corresponding to r ¼ 0:5, m ¼ 100 requests=s, and the rejection ratio y ¼ 0. While for r ¼ 0:8; m ¼ 100 requests=s, and y ¼ 0, the M/M/1 model computes the mean response time to be 0.05 s. Actually the M/M/1 model indicates that it needs to set the rejection ratio y ¼ 0:2 to achieve T ¼ 0:02 s for r ¼ 0:8. Therefore, prompt detection of load change from r ¼ 0:5–0.8 would be required for the M/M/1 queueing-based approach (which can be considered as an open-loop control) in order to make appropriate adjustment in admission control. In comparison, feedback-control-based approaches are able
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467
1466
1
Workload intensity
0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
500
1000
1500
2000
time (x50 sec) 101 LQ LPV
100 response time (sec)
changes. Compared to traditional queuing-based approaches that rely on steady-state analysis and prediction of workload parameters, the LPV design shapes the system’s transient performance without requiring a priori knowledge of workload parameters, but instead, their online measurements. Therefore, the proposed LPV modeling and control framework sets a promising direction for the performance management of today’s Internet servers which are operated in an open environment with unpredicted load changes. Though the design example on web-server admission control in this paper has ignored certain system complexity, and it has only been evaluated by simulations using synthetic workloads, it serves well the purpose of illustrating how the LPV system identification and control design algorithms can be applied to performance management. The preliminary results show the strength and effectiveness of these nonlinear modeling and control methodologies. Acknowledgments The authors would like to thank Dr. A. Sivasubramiam and Dr. N. Gautam for helpful discussions and also would like to thank Mr. Amitayu Das for setting up part of the web server simulation.
10-1
10-2
References 10-3 0
200 400 600 800 1000 1200 1400 1600 1800 2000 time (x50 sec)
Fig. 10. Response time histories for an LQ controller versus that of an LPV controller, both of which are operated under a synthetic workload with dynamically changing load conditions. (a) Workload intensity history of the synthetic workload; (b) response time comparison.
to automatically adapt to the load changes, though linear control can only adapt to very limited load variations. 6. Conclusion This paper presents an identification-based LPV modeling and robust control for the admission control of an Internet web server. In particular, the rejection ratio for incoming requests is dynamically determined so that the response time for admitted requests can meet the target value with a minimal number of requests being rejected. It is the first effort to apply (nonlinear) LPV system identification and control design to explicitly model the admission control subject to dynamically varying load conditions. Workload intensity, which is the ratio of the mean arrival rate and service rate, has been used as the scheduling parameter in the LPV modeling and control, which allows the system’s rapid adaptation to traffic
Abdelzaher, T. F., Lu, Y., Zhang, R., & Hennksson, D. (2004). Practical application of control theory to web service. Proceedings of American control conference (pp. 1992–1997). Abdelzaher, T. F., Stankovic, J. A., Lu, C., Zhang, R., & Lu, Y. (2003). Feedback performance control in software services. IEEE Control Systems Magazine, 23(3), 74–90. Altman, E., Basar, T., & Srikant, R. (1999). Congestion control as a stochastic control problem with action delays. Automatica, 35, 1937–1950. Andersson, M., Kihl, M., & Robertsson, A. (2003). Modeling and design of admission control mechanisms for web servers using nonlinear control theory. Proceedings of information technologies and communications (ITCom 2003), Orlando, FL. Apkarian, P., & Gahinet, P. (1995). A convex characterization of gainscheduled H 1 controllers. IEEE Transactions on Automatic Control, 40, 853–864. Apkarian, P., Gahinet, P., & Becker, G. (1995). Self-scheduled H-infinity control of linear parameter-varying systems: A design example. Automatica, 31(9), 1251–1261. Bamieh, B., & Giarre, L. (2002). Identification for linear parameter varying models. International Journal of Robust and Nonlinear Control, 12, 841–853. Bolch, G., Greiner, S., de Meer, H., & Trivedi, K. S. (1998). Queueing networks and Markov chains. New York: Wiley. Delli Priscoli, F., & Isidori, A. (2005). A control-engineering approach to integrated congestion control and scheduling in wireless local area networks. Control Engineering Practice, 13(5), 541–558. Diao, Y., Gandhi, N., Hellerstein, J. L., Parekh, S., & Tilbury, D. M. (2002). Using MIMO feedback control to enforce policies for interrelated metrics with applications to the Apache web servers. Proceedings of network operations and management (pp. 219–234). Diao, Y., Hellerstein, J. L., & Parakh, S. (2002). Using fuzzy control to maximize profits in se rvice level management. IBM Systems Journal, 41(3), 403–420.
ARTICLE IN PRESS W. Qin, Q. Wang / Control Engineering Practice 15 (2007) 1457–1467 Giarri, L., Bauso, D., Falugi, P., & Bamieh, B. (2006). LPV model identification for gain scheduling control: An application to rotating stall and surge control problem. Control Engineering Practice, 14(4), 351–361. Hellerstein, J. L., Diao, Y., & Parekh, S. (2002). A first-principles approach to constructing transfer functions for admission control in computing systems. Proceedings of IEEE conference on decision and control (pp. 2906–2912). Las Vegas. Kuri, J., & Kumar, A. (1995). Optimal control of arrivals to queues with delayed queue length information. IEEE Transactions on Automatic Control, 40(8), 1444–1450. Lee, L. H., & Poola, K. (1999). Identification of linear parameter varying systems using nonlinear programming. ASME Journal of Dynamic Systems, Measurement, and Control, 121(1), 71–78. Lu, C., Guillermo, A. A., & Wilks, J. (2002). Aqueduct: Online data migration with performance guarantee. Proceedings of the USENIX conference on file and storage technologies (pp. 219–230). Lu, Y., Abdelzaher, T. F., Lu, C., & Tao, G. (2002). An adaptive control framework for QoS guarantees and its application to differentiated
1467
caching services. Proceedings of tenth international workshop on quality of service (pp. 23–32). Parakh, S., Gandhi, N., Hellerstein, J. L., Tilbury, D. M., & Bigus, J. P. (2001). Using control theory to achieve service level objectives in performance management. Proceedings of IEEE/IFIP symposium on integrated network management (pp. 841–854). Robertsson, A., Wittenmark, B., Kihl, M., & Andersson, M. (2004). Design and evaluation of load control in web server systems. Proceedings of American control conference (pp. 1980–1985). Boston, MA. Schwetman, H. (1990). Introduction to process-oriented simulation and CSIM. Proceedings of winter simulation conference (pp. 154–157). Sznaier, M., & Mazzaro, C. (2003). An LMI approach to control-oriented identification of LPV systems. IEEE Transactions on Automatic Control, 48(9), 1619–1624. Wu, F., & Prajna, S. (2004). A new solution approach to polynomial LPV system analysis and synthesis. Proceedings of American control conference (pp. 1362–1367).