1. Introduction
To study real data transmission systems, cellular networks, and cloud computing systems, the mathematical apparatus of queuing theory is used. It includes models of the process of request arrivals, operation of service devices, as well as other features such as changes in parameters of the system over time, and so on. Queueing systems with variable service and arrival rates arise naturally in practice, and therefore, one can find many classical works. Such systems in queuing theory are called queuing systems operating in a random environment [
1,
2,
3,
4]. These models more accurately reflect real processes compared to classical systems, taking into account the change in the external random environment over time and the system’s response to these changes [
5,
6].
One of the first works devoted to the study of queuing systems in a random environment is the 1963 publication by M. Eisen and M. Taineter [
7], where a single-server system was considered under the assumption that the external environment can be in only two states. Later, in the works of Naor and U. Yechiali [
8], the results were generalized to the case of an arbitrary finite number of states of the external environment.
In 1981, M. F. Newts proposed a fundamental method for analyzing queuing systems in a random Markov environment [
9]. He reduced the problem of determining the characteristics of the system to solving a matrix equation, which made it possible to study the parameters of systems with dependence on the state of a Markov chain with a finite number of states.
Further development was the expansion of the class of queuing systems in a changing external environment: single- and multi-channel queuing systems [
10,
11], retrial queues [
12], resource queues [
13,
14], and inventory management systems [
15,
16,
17].
Various works consider various options for the reaction of requests to the transition of the environment to a new state. For example, in [
18], a case is presented in which at the moment of the environment state changed, all requests immediately leave the system. In papers [
19,
20] an option is considered in which, at the moment of the environment transition to a new state, the requests existing in the system switch to the corresponding new service mode. Infinite-server queues are one of the most common models in the queueing theory and are often used to model systems with instant start of the service, such as satellite communication lines or long communication cables, or to approximate the behavior of multi-server systems. There are many works devoted to the study of infinite-server systems in both Markov [
1,
19,
21,
22,
23] and semi-Markov [
2,
3,
20,
24,
25] random environments.
Let us present several significant results on the methods of studying infinite-server queues operating in a random environment. In [
21], the authors consider queue M/M/
∞, where only the service rates are regulated by an external process, which is a Markov chain with continuous time and two states. It is shown that the number of requests in the system in the stationary mode can be written as the sum of two independent random variables, where one of these variables is Poisson. Further, B. D’Auria [
24,
25], using the stochastic decomposition method, showed that using the basic properties of Poisson processes, it is possible to obtain similar results for the number of requests in a similar system in the case of a non-Markov random environment. In the work of Falin G. [
2], a model is considered in which a random environment affects both the rate of arrival and the service rate, which are influenced by a semi-Markov environment. To find the average number of requests in the system in the steady state, the method of supplementary variables is used. Namely, a three-dimensional Markov process is considered, the components of which are the number of customers in the system, the state of the environment, and the residual time until the next transition of the environment. This allows us to obtain an expression for the generating function of the number of customers in the system, and it can be used to calculate numerical characteristics in the steady state. In those cases when the study cannot be found by classical methods of the queueing system, asymptotic methods [
19,
20] are used. As a rule, these papers consider cases where the mode of servicing requests is not changed until they leave the system.
Cloud systems provide different services for users. Interaction with cloud servers is usually hidden from users under a specific user interface, so, actually, cloud servers receive only requests from this interface. There are many approaches for the mathematical modeling of cloud server operations. One of the most promising and productive approaches is using the queueing theory. In [
26,
27,
28,
29] and many other papers, different queueing models of cloud systems were considered, and various methods were provided for their study. A good and actual analysis of the queueing theory application in modeling cloud systems was done in [
30].
In this paper, we consider a specific case of the models where there are several types of requests incoming to a cloud server and some input device coordinates their arrivals. We propose to model such system in the form of a heterogeneous queueing system with an unlimited number of servers operating in a random environment, allowing one to take into account the dependence of the service time on the type of the request. For the study, the method of asymptotic analysis [
31] is used under the condition of extremely rare changes in the random environment. We rely on the method of asymptotic analysis but extend it to the class of heterogeneous systems operating in a random environment. The main difference from the previous work is the different services provided to different types of clients.
The rest of the paper is organized as follows. System and mathematical models are introduced in
Section 2. In
Section 3 we derive the main system of equations for analysis of the model. In
Section 4 expressions for the evaluation of exact moments of the target distribution are obtained and analyzed. In
Section 5, we apply the method of the asymptotic analysis to solve the main system of equations under the asymptotic condition of rare changes in the random environment. Finally, we perform numerical analysis of the precision of the solution to find its error and applicability area in
Section 6.
2. Mathematical Model of M/M/∞ in Markov Random Environment
Consider a cloud server that performs some operations according to incoming requests. The execution of these requests and further operations take some time and occupy some hardware resources of the server. In this paper, we consider only computational resources—CPU cores that are used for the execution of requests. We consider a situation where the server executes one type of request for a long time. The ‘type’ can be referred to as the main characteristics of the requests execution: average intensity of their arrivals, average execution time, and so on. Sometimes, an input device (e.g., balancer) switches the server to accept requests of another type. The problem is to find the distribution characteristics of the requests of different types present in the system. Such analysis can give some helpful information for the server owner, for example, how many cores can be required simultaneously for the execution of requests, how many other types of resources (like RAM, disk space, etc.) should be provided for the normal operation of the server if requirements for resources depend on the types of requests, and so on. We propose to use a heterogeneous infinite-server queue operating in a random environment for modeling the described system.
So, let us consider the following heterogeneous queueing system M/M/
∞ operating in a Markov random environment (
Figure 1).
The process of changing the states of the external environment is a continuous Markov process with finite number of states , which is determined by a generator matrix The state of the environment determines the intensity of the arrival process, the values of which take the values .
The discipline of servicing the incoming requests is also determined by the state of the environment at the time of the request arrival. If the environment is in the state
, then the request is serviced during a random time distributed according to the exponential law with parameter
. The service time is not changed while the request is serviced, even if the random environment changes its state. Thus, the system simultaneously services requests with different service parameters, which is why such systems are called heterogeneous [
32,
33]. Such systems more adequately describe the processes of information transfer, but their study is significantly complicated due to the multi-dimensionality of the process being studied. Let us denote the number of requests of type
s (serviced with parameter
) at time moment
t by
.
The problem is to study multi-dimensional Markov random process , namely, to find its multi-dimensional joint probability distribution.
3. Kolmogorov Equations
Let us introduce the notation.
and the notations for the row vectors
Let us use the total probability formula and compose a system of equations for all
and
:
where
is the probability that the environment changes its state from v to s during time interval ;
is the probability of a new request arrival during time interval when the environment is in state s;
is the probability that one of the requests of type s finishes its service;
is the probability that nothing happens in the system during time interval when the environment is in state s and the number of requests of the corresponding types present in the system are the components of vector .
Let us divide each equation by
and make limit transition
; then the system takes the form
with initial conditions
where
is a row vector of the stationary probability distribution of the Markov chain
, which can be evaluated from the system of linear equations
Here and below is a column vector which consists of ones.
Suppose that the system has a stationary regime, then we can write the system of linear equations for the stationary probabilities:
where
is the stationary probability distribution of the random process under consideration.
For further study, we use the method of characteristic functions. Let us denote
are the partial characteristic functions of the stationary probability distribution of the number of requests in the system. Using matrix notations
Finally, we can write the system of Kolmogorov Equation (
3) in the matrix form for characteristic functions:
4. Evaluating Exact Moments of the Distribution
Using the properties of characteristic functions, we can determine the exact values of moments of the probability distribution of the number of requests of different types present in the system, including correlation coefficients.
To find the mathematical expectation of the number of requests of each type, we differentiate each equation of system (
4) with respect to all variables
. We obtain a system of differential equations, which we write in matrix form
where
Let us substitute
and introduce the notations
Here
are partial moments of the first order, i.e., the average number of requests of the
k-th type when the random environment is in state
s.
Entries of matrix
are determined from the stationary probabilities of the states of the Markov chain (
2).
As a result, we derive the following matrix equation for evaluating the first raw moments:
Let us multiply both parts of the equation by vector
; we obtain
It follows that the mathematical expectation of the number of requests of the
k-th type is calculated by the expression
In a similar way, we can find raw moments of the second order. They are determined by expressions.
for all
It is easy to obtain that the raw correlation moment for values of
and
is determined by the expression.
A detailed description of the derivation of this formula for the special case of
can be found in [
33].
Thus, the obtained formulas allow us to find exact values of the first- and second-order moments for the stationary distribution of the multi-dimensional random process of the number of requests of different types present in the system.
Obviously, the components of this multi-dimensional random process are dependent random variables. Let us consider how the system parameters affect the values of the correlation coefficient.
where
is a variation of component
l.
Consider the following numerical example. Let the random environment have three possible states, which are determined by the generator matrix
where
takes small values which reflect rare changes in the ransom environment (see
Section 5 and
Section 6 for details). Let the intensities of arrivals be the following:
where
takes growing values which correspond to the case of growing intensity of arrivals. Let service rates for all types of requests be equal to
.
Numerical calculations show that the absolute value of the correlation coefficient (
6) increases with an increase in the intensity of the arrival process (growing of
N) and rarity of changes of states of the random environment (decreasing of
). Values of the correlation coefficient
of the number of requests of the first and second types present in the system are presented in
Table 1.
5. Asymptotic Analysis Under Extremely Rare Changes of the Environment
The goal of this paper is to find the probability distribution
of the random process under consideration in the steady-state regime. To do this, we need to solve the system of Equation (
4). Unfortunately, it seems impossible to solve it in a direct way. So, we apply the method of asymptotic analysis similar to [
31] to find its solution. In this paper, we will find the solution under the asymptotic condition of extremely rare changes in the states of the random environment. The difference from [
31] is that here we have different service rates for customers of different types in the model, which leads us to the multi-dimensional model and multidimensionality of the system of equations in several components. So, we should try to find the solution taking into account this fact. To do this, we will expand (
4) by components and solve the system as a series of equations with less multidimensionality.
The average duration of the Markov chain of stay in the
k-th state is determined as
So, a decrease of values
leads us to rare changes of the states of the random environment. To perform asymptotic analysis, we represent the generator of the Markov chain in the form
where
is some infinitesimal generator matrix with finite entries and parameter
takes small values and tends to zero in theoretical derivations. Let us substitute
instead of
in (
4); we obtain the equation
Let
here; then we obtain
or in the expanded form:
Consider the first equation of the system:
We can solve this partial differential equation by the method of characteristics:
Consider the equations
for
From each of them, we derive
Then we consider the last equation from (
11):
Performing the following derivations:
we obtain its solution in the form
where
is some function which can be found from the initial condition:
So, we obtain the following solution of (
10):
In a similar way, we obtain
for each
Summing up all these expressions, we find the characteristic function of the joint probability distribution of the number of requests of each type:
One-dimensional characteristic functions of the stationary probability distribution of the number of requests of type
have the form
Therefore, the generating function has the form
It follows that the probability of the absence of requests of the
s-th type is determined as
6. Numerical Analysis
Because the result (
12) is obtained under the asymptotic condition of extremely rare changes of the random environment (
), it is necessary to check the accuracy and find the area of applicability of this result. To do this, we can compare distributions (
12) and (
13) with exact (not limiting) results.
First of all, we can notice that asymptotic and exact expressions (see
Section 4) for the mathematical expectation coincide. Let us compare variations of these distributions. We can do this numerically, for example from
Section 4.
For comparison, let us calculate relative errors of theoretical
and asymptotical
variances of one-dimensional distributions of
:
The results of the evaluations for various values
and
are presented in
Table 2. So, we can draw a conclusion that the second moments of the asymptotic distribution become more precise with the decrease of
and they have enough good accuracy (about 5% and less) for
.
Let us study why the error of the second moments of the asymptotic distribution is so big for greater values of
. This follows from the probability distribution law (
12) and (
13): it has a jump in point
(see solid line in
Figure 2). This jump can be big enough in relation to the nearest points, and the distribution has the second mode far from 0. For example, for requests of the third type
while
, and the distribution has the second mode in points 9, 10.
For the analysis of the accuracy of the entire distribution, we performed experiments using simulation modeling. In
Figure 2, you can see a graphical comparison of asymptotic distribution (it is not changed when
changes its values) and probability distributions obtained from simulation results for various values of
.
For numerical analysis of the accuracy of asymptotic distributions (
13), we use Kolmogorov distances.
where
is asymptotical one-dimensional cumulative distribution function of the number of requests of type
s (
),
is cumulative distribution function of the number of requests of type
s obtained from simulation for chosen value of
. Values of the Kolmogorov distances evaluated for various values of
are presented in
Table 3.
The number of iterations in the simulation experiments is chosen from a criterion that an estimated error of the simulation result should not be greater 0.001. Such an error does not influence the evaluation of the asymptotic result accuracy. We estimate the error of the simulation by comparing the results of several runs of the simulation and evaluating the maximum difference between them in terms of the Kolmogorov distance. So, we discover that the number of iterations greater than 2 million is enough to reach such accuracy.
Let us assume that the accuracy of the asymptotic distribution is good enough if its value of the Kolmogorov distance is equal to or less than 0.05. So, from the table, we see that such values of accuracy are achieved when for requests of the first type, for requests of the second type, and for requests of the third type.
So, we can draw a conclusion that asymptotic result (
12) provides good accuracy for the cases when the average number of requests in the system is not too big (there are no two modes in the distribution) and intensities of changing states of the random environment are small enough. To be more precise, based on the comparative analysis conducted, it can be concluded that the asymptotic Formulas (
12) and (
13) can be applied when values of the average intensity of changes in the state of random environment do not exceed 0.03.
Let us consider practical usage of the obtained results. First, let us discuss what “rare changes of the states of random environment” mean. Consider the example with parameters (
8) and (
9), evaluated distributions presented in
Figure 2 and estimations of their error presented in
Table 3. The average intensity of arrivals in this model is about 2.7. Because we have found that the average intensity of the state changes should be 0.03 or less to the precision of approximation (
12) and (
13) be acceptable, then we can draw a conclusion that the frequency of the random environment state changes should be less than the intensity of arrivals by 100 times or greater. In practice, this means that the changes should occur after 100 requests or more on average. Such a picture is typical enough for real computing systems—in real systems, we usually encounter situations where thousands or millions of requests of one type arrive before the balancer swithces to receiving another type of request.
Let us discuss the implications of a probability distribution (
12) and (
13) for real-world problems. When we have a probability distribution represented analytically, we can use it to solve more complex problems of analyzing and improving system performance. In particular, such problems may be related to system optimization. Let us say, in the given example, requests of the second and third types are very demanding on computing resources, but their execution is cost-effective. We can formulate an optimality criterion that depends on the number of requests of these types simultaneously present in the system (a negative factor) and the number of requests of these types processed (a positive factor). The criterion can have the form
where
is a cost function of the resources consumed by requests of types 2 and 3 during their execution,
is a profit function of the number of the requests of the second and third types (
and
respectively) processed by the system during fixed time interval,
and
are parameters of the system (intensities of the state changes and arrivals) which we can vary to reach maximum value of the criterion. By adjusting these parameters, for example, the time of the random environment being in states 2 and 3 (the average time when the balancer receives requests of these types), we can find conditions where criterion (
14) reaches its maximum value. Unfortunately, a specific solution to problems of this type is beyond the scope of this article.