1 Introduction

With technological advance of smartphone, numerous mobile applications have deployed over wireless mobile networks. However, despite all the advancements in recent years, it is still challenging for smartphone to support highly sophisticated applications due to the limited key resources such as low battery, small memory capacity and poor processing power. Mobile cloud computing (MCC) is considered as a promising technology to overcome resource constraints [1]. It is the combination of mobile computing, mobile Internet and cloud computing that bring the rich computational resources to mobile phone. By offloading computing intensive code of mobile program to remote cloud, mobile phone gets rid of the hardware bondage and the energy consumption of mobile devices can be significantly reduced [2].

However, MCC faces high latency problem because of the connection between mobile phone and remote cloud. Cloudlet is located at the near vicinity of the mobile users and linked to the remote cloud through high speed wired connections [3]. It is a mobility-enhanced small-scale cloud and it constitutes a three tier structure: mobile phone, cloudlet and remote cloud, which can support both latency-sensitive and highly sophisticated mobile applications by providing rich computational resources to mobile phone with lower latency [4]. The response time of real-time application can be speeded up by high bandwidth wireless access to the cloudlet [5]. Compared to the conventional mobile device-remote cloud structure, this new architectural element can improve the whole system efficiency. However, the cloudlet has a much smaller scale compared with the remote cloud, and correspondingly, has a more limited resource.

Compared to the traditional MCC, the cloudlet-based MCC can address the high latency issue. However, running real-time application in the cloudlet-based MCC environment requires both cloud computing and wireless network operation. And how to utilize the resources of cloud and wireless networks to maximize the whole system performance is crucial. In contrast to conventional wireless resource allocation problems, joint optimization of multi-resource will bring many new challenges. Firstly, limited and time-varying wireless bandwidth which connects the mobile devices and cloudlet is a persistent problem. Secondly, as more and more applications migrate to cloud, how to utilize the computing resource at both cloudlet and remote cloud server to ensure the optimal usage is crucial. Finally, to maintain the performance of MCC applications, resource management of cloudlet-based MCC needs multiple levels and more fine-grained operations.

In this paper, we consider a cloudlet-based MCC environment consisting of multiple cloud servers, a cloudlet and multiple mobile terminals. Cloud server provides computing resource in the form of virtual machines (VMs). Cloudlet leases VMs from the cloud servers to provide cloud-based application services to its mobile terminals. We consider that remote cloud servers, cloudlet and mobile terminals are selfish, and have their own interests. The remote cloud servers aim to maximize their revenues by determine the VMs price to cloudlet. Cloulet’s objective is to maximize its profit to serve the mobile terminals’ requests. Mobile terminals perform bandwidth and power allocation to maximize individual net utility. Price-based game theoretic approach is adopted and the problem of joint optimization of wireless bandwidth and computing resource in cloudlet-based MCC system is modeled as triple-stage Stackelberg game. We analyze the subgame perfect equilibrium of each stage exploiting backward induction method and Stackelberg equilibrium is obtained by iterative algorithm.

We summarize the main contributions of this paper as follows:

  • 1):     We formulate the wireless bandwidth and computing resource allocation problem as triple-stage Stackelberg game. Spectral efficiency as well as the pricing information are considered at the mobile terminal and cloud server respectively, so that the performance of the whole system can be enhanced.

  • 2):     A well-balanced network performance among mobile terminals, cloudlet and remote cloud is achieved through the proposed triple-stage Stackelberg game. Based on this model, we find an effective way to obtain suitable solution.

  • 3):     The subgame optimal equilibrium for each stage is analyzed and the triple-stage game Stackelberg equilibrium is obtained by an iterative algorithm.

The remaining part of the paper is organized as follows. In Sections 2 and 3, related work and system model are presented, respectively. Section 4 analyzes the proposed game. The simulation results are discussed in Section 5. Finally, Section 6 concludes the paper.

2 Related work

In this section, we present a review of related works centered around network management, wireless and computing resource allocation and pricing in MCC environment, respectively.

A QoE-based joint dynamic cloud and radio resource allocation scheme for MCC is presented in [6]. The problem of bandwidth shifting and redistribution in an MCC environment is addressed in [7]. However, these works only address the radio resource allocation of cloud servers without consideration of computing resource. The computing resource is essential element of MCC resource allocation scheme.

There exist few computing and bandwidth resource allocation schemes in MCC that help to enhance the quality of mobile cloud service, in terms of the number of admitted mobile applications [8], the service latency [9] and the power consumption [5, 10]. Reference [8] proposes a resource sharing scheme among different cloud service providers to obtain the maximum number of applications that can be supported to maximize their revenue. Several computation offloading schemes based on the communication model and computation model to obtain efficient offloading performance are proposed in [9, 10]. However, these literatures study resource allocation mainly based on remote cloud-mobile terminal structure. The joint resource allocation problem at both remote cloud server, cloudlet and mobile terminal is not considered.

In MCC system, pricing is an efficient lever in the resource management problem [11, 12]. A joint cloud price decision, wireless resource allocation and interference management pricing scheme to maximize the system profit is considered in [11]. In [12], joint pricing and virtual machine capacity planning in the cloud-based service provider market is proposed to maximize the server profit. Game theory is a better method to model the interaction between cloud server and mobile user in [1317]. In [13], a rendering adaption technique which deal with the limited and time-varying channel and the available cloud server computational resource for maximizing mobile gaming user experience is developed. In [14], a two-stage nested game-based formulation for multiple mobile devices and cloud resource manager is proposed. In this game, the mobile device makes offloading decision to minimize power consumption, whereas the cloud resource manager allocates its resources to cloud server to maximize the profit. A multi-dimensional dynamic resource allocation scheme which modeling the mobile cloud application, wireless interfaces and cloud resources is proposed to save the mobile battery and guarantee both QoS and cost in [15].

To our best knowledge, there are lack of solutions to improve end-to-end performance in cloudlet-based MCC environment. Accurately, how to utilize the multi-resource of mobile terminal, the cloudlet and remote cloud to maximize the whole system performance is an important issue for cloudlet-based MCC. Furthermore, how to efficiently manage the wireless and computing resources to maintain the performance of MCC applications is still a challenging problem. To deal with above problems and provide better cloud application service to end-users, the joint optimization of wireless bandwidth and computing resource subject to user’s QoS requirements should be considered to ensure the optimal usage of whole system resources.

3 System model and problem formulation

3.1 System model

In this paper, we consider a cloudlet-based MCC network consisting of multiple remote cloud server, a cloudlet and multiple mobile terminals as shown in Fig. 1. The remote cloud server is connected with the cloudlet through high speed wire line and the wireless bandwidth connects the mobile terminals and cloudlet. The mobile device can run mobile applications locally, or offload some workload to the cloudlet for faster execution. We assume that mobile devices offload their full tasks to the cloudlet when running application. Compared to remote cloud, the computing capacity of cloudlet is not sufficient. When the resource of cloudlet is exhausted or not enough to satisfy their mobile devices’ demands, the cloudlet tends to purchase computing resource from remote clouds [18, 19].

Fig. 1
figure 1

System model of mobile cloud computing

In this model, the set of remote cloud servers is denoted by R = {1, 2, ..., R}, where R is the total number of remote cloud servers. The set of mobile terminal is K = {1,2,...,K}, where K represents the total number of mobile terminals. The number of VMs that can be supported at the cloudlet is denoted as M, and the number of VMs at the remote cloud server is assumed to be N (NM). The number of wireless bandwidth units provided by the cloudlet is denoted as B. The notations used in this paper are summarized in Table 1.

Table 1 Simulation parameters for performance evaluations

For terminal k (i.e., k ∈ {1, 2, ..., K}), we assume that it connects to the cloudlet through the access point and in each time slot, each access point serves one mobile terminal. The maximum rate of terminal k can be expressed as:

$$ R_{k} = b_{k}\log_{2}\left( 1 + \frac{p_{k}g_{kk}}{\sum\nolimits_i = 1,i \ne k^{K}p_{i}g_{ik} + \sigma_{k}^{2}} \right), $$
(1)

where b k denotes the transmission bandwidth of terminal k, p k denotes the transmit power assigned to terminal k, g k k is the channel gain between terminal k and its corresponding access point including the pass-loss and \({\sigma _{k}^{2}}\) is the additive white Gaussian noise (AWGN). According to the Shannon’s spectral efficiency [20], the spectral efficiency of terminal k can be expressed as:

$$ {\eta_{k}} = \frac{{{R_{k}}}}{{{b_{k}}}} = \frac{{{b_{k}}{{\log }_{2}}\left( {1 + \frac{{{p_{k}}{g_{kk}}}}{{\sum\nolimits_{i = 1,i \ne k}^{K} {{p_{i}}{g_{ik}} + {\sigma_{k}^{2}}} }}} \right)}}{{{b_{k}}}} = {\log_{2}}\left( {1 + \gamma } \right), $$
(2)

where γ is signal to interference plus noise ratio (SINR) of terminal. Each mobile terminal k submits b k ((0<b k < B)) to cloudlet. In each time slot, cloudlet aggregates all the bid values such that \(\sum \nolimits _{k = 1}^{K} {{b_{k}}}\), and adds the aggregated value to its own reserve bid b 0. The computed bid value is equal to or smaller than the availability of cloudlet bandwidth B (\(\sum \nolimits _{k = 1}^{K} {{b_{k}}} + {b_{0}} \le B\)).

3.2 Problem Formulation

We consider the case where there are multiple remote cloud server, a cloudlet and multiple mobile terminals, that are assumed to be selfish and rational. For remote cloud server, they compete with each other in terms of prices to maximize their own profit while the terminals compete for bandwidth and power resources. The interactions between remote cloud and cloudlet, cloudlet and mobile terminal can be typically modeled as multi-stage leader-follower game. According to such characteristics, we use the non-cooperative Stackelberg game to jointly maximize the remote cloud servers’ revenue, the utility of cloudlet and individual utilities of mobile terminals in MCC. In Stackelberg game, the up-stage is the leader, which makes decision first. The down-stage acts as the follower and moves subsequently based on observing the up-stage’s strategy. The decision of up-stage affects the down-stage strategy and equally, the up-stage takes the behavior of down-stage into consideration [21].

In this paper, we use triple-stage Stackelberg game, as summarized in Fig. 2, to analyze the relationship of remote cloud servers and cloudlet, cloudlet and mobile terminals. The three basic components of the triple-stage Stackelberg model are defined as follows:

  • 1)     a set of players: Remote cloud servers, cloudlet and mobile terminals are defined as players. The remote cloud servers claim a price per VM to cloudlet and try to maximize their own revenue. Then, based on the VM price provided by servers, cloudlet needs to update its strategy to maximize its net utility. Finally, mobile terminals make decisions of their own bandwidth and power requirements. In this paper, all remote cloud servers, cloudlet and mobile terminals are selfish game players.

  • 2)     the action of each player: The price per VM λ = {λ 1, λ 2, ...,λ R } is defined by the action of the remote cloud server, and the computing resource allocated to the mobile terminals m = {m 1, m 2, ...,m K } is the action of the cloudlet, while the required bandwidth b = {b 1, b 2, ...,b K } and transmit power p = {p 1, p 2, ...,p K } from cloudlet are the action of mobile terminal. In stage One, remote cloud servers (leader) impose a set of unit prices for the computing resource, following which the cloudlet determines the amount of computing resources allocating to each mobile terminals. Finally, each mobile terminal determines the bandwidth assignment and power allocation.

  • 3)     a set of utility functions: To cloud servers, we define the profit function U r (λ) as their utility function. The profit of cloud server is equal to the cost of cloudlet. The cloudlet utility function U C (m) is comprised of three parts considering the benefit of computing resource and bandwidth allocation, payment for the computing resources. The utility function of mobile terminal U T (b,p) consists of the benefit of bandwidth resource and power allocation as well as the payment to the cloudlet.

Fig. 2
figure 2

Triple-stage Stackelberg game

The triple-stage Stackelberg game can thus be denoted by

$$ \textbf{G} =\left( \mathbf{\lambda,m,b,p,U_{r}\left( \lambda\right), U_{C}\left( m\right), U_{T}\left( b,p\right)} \right), $$
(3)

To obtain the Stackelberg equilibrium of this game, firstly, the non-cooperative game problem of stage three can be expressed as:

$$ \max\limits_{b_{k}^{*},p_{k}^{*}} {U_{T}}\left( {{b_{k}},{\textbf{b}}_{- k}^{*},{p_{k}},{\textbf{p}}_{- k}^{*}} \right), $$
(4)

where \(\textbf {b}_{- k}^{*}\) and \(\textbf {p}_{- k}^{*}\) denote the optimal configurations of required bandwidth and power adopted by all the other terminals except k, respectively. Then, based on the optimal strategies of stage three, the game of stage two can be expressed as:

$$ \max\limits_{m_{k}^{*}} {U_{C}}\left( m_{k}\right), $$
(5)

where \({\textbf {m}}_{k}^{*}\) denotes the optimal required VMs strategy vector of mobile terminal k. According to the optimal strategies of above stages, the non-cooperative game problem of stage one can be expressed as:

$$ \max\limits_{\lambda_{r}^{*}}U_{r}\left( \mathbf{\lambda_{r}}, \mathbf{\lambda_{- r}^{*}} \right), $$
(6)

where \(\mathbf {\lambda }_{- r}^{*}\) defines the optimal pricing strategy vector eliminating the strategy of remote cloud server r. Hence, (λ ,m ,b ,p ) is the Stackelberg equilibrium of game G = (λ , m , b , p , U r (λ), U C (m), U T (b,p)).

4 The proposed game

In this section, we first describe the proposed algorithm. Then, we analyze the proposed Stackelberg game. The backward induction method is employed to solve this proposed game.

4.1 Mobile terminal algorithm

The mobile terminals are assumed to behave in a non-cooperative way with no information exchange. Each mobile terminal independently decides its own bandwidth requirement and transmit power, the utility function of which consists of two parts: profit and cost. The benefit is related to not only the bandwidth, but also the power. The cost of the terminal includes the payment for the bandwidth and power to the cloudlet. Hence, we formulate the k-th terminal utility function as follows:

$$ {U_{{T_{k}}}}\left( {{b_{k}},{p_{k}}} \right) = {B_{k}}{\eta_{k}}{r_{b}} - {b_{k}}{c_{b}} - {p_{k}}{c_{p}}, $$
(7)

where B k is the allocated bandwidth of the k-th terminal from the cloudlet, \({B_{k}} = b_{k}\left ({B - {b_{0}}} \right )\left / b_{k}\left (B - b_{0}\right )\right . \left .\sum \nolimits _{k = 1}^{K} b_{k}\right . \sum \nolimits _{k = 1}^{K} b_{k}\), p k is the k-th mobile terminal transmit power. η k denotes the spectral efficiency of the k-th mobile terminal. r b denotes the k-th terminal’s revenue per unit transmission rate. c b and c p denote the cost per unit bandwidth and power allocation, respectively. B k η k r b is the revenue of the k-th terminal with bandwidth b k and power p k , and b k c b + p k c p is the fees paid to cloudlet. Increasing the bandwidth and transmit power is a natural way to enhance the terminal’s performance. However, with the increase of transmit power and bandwidth, the interference between the terminals will definitely increase. Therefore, power and bandwidth allocation strategies are needed for mobile terminals to maximize their own utility.

The utility maximization problem is expressed as follows:

$$ \begin{array}{l} \max \limits_{b_{k}^{*},p_{k}^{*}}{U_{{T_{k}}}}\left( {{b_{k}},{{\textbf{b}}_{- k}},{p_{k}},{{\textbf{p}}_{ - k}}} \right),\\ s.t. \,\,{b_{k}} \ge b_{\min }^{k}, \forall k \in (1,K),\\ \,\,\,\,\,\,\,\,\,\,{p_{k}} \ge 0, \forall k \in (1,K)\\ Variables \left\{ {{b_{k}},{p_{k}}} \right\} \end{array} $$
(8)

where b k is the vector of bandwidth allocation for all mobile terminal except terminal k. p k denotes the set of power of mobile terminals other than the terminal k. The required bandwidth from all terminals is less than the total bandwidth B. \({b_{k}} \ge b_{\min }^{k}\) means k-th terminal required bandwidth should be above the minimum demand. Transmit power of the k-th terminal from cloudlet must larger than or equal to zero.

4.2 Cloudlet algorithm

For cloudlet, their responsibility is to allocate the VMs to the mobile terminals. The aim of cloudlet is to maximize the utility. The net utility obtained from mobile terminal k can be expressed as follows:

$$ \begin{array}{l} {U_{{C_{k}}}}\left( {{m_{k}}} \right) = {R^{T}}\left( {{b_{k}},{p_{k}}} \right) + {R^{C}}\left( {{m_{kr}}} \right) - \sum\limits_{r = 1}^{R} C \left( {{m_{k}},\lambda } \right), \end{array} $$
(9)

Where R T(b k , p k ) and R C(m k r ) define the cloudlet revenue function based on providing bandwidth and power resource, and computing resource to mobile terminal k, respectively. C(m k , λ) defines computing resource allocation cost function. m k r denotes the k-th mobile terminal requiring computing resource from the r-th remote cloud server and \({m_{k}} = \sum \nolimits _{r = 1}^{R} {{m_{kr}}} \). In this paper, we model the revenue function R T(b k , p k ) and R C(m k r ) as c b b k + c p p k and r k M k , respectively. Where r k denotes the cloudlet’s revenue per unit VM to terminal k and \({M_{k}} = {N\sum \nolimits _{r = 1}^{R} {{m_{kr}}} } \left / {{N\sum \nolimits _{r = 1}^{R} {{m_{kr}}} } {\sum \nolimits _{k = 1}^{K} {\sum \nolimits _{r = 1}^{R} {{m_{kr}}} } }} \right . \sum \nolimits _{k = 1}^{K}\) \({\sum \nolimits _{r = 1}^{R} {{m_{kr}} }}\) is the total VMs of k-th terminal obtained from all remote cloud servers, N is the total VMs resource of each remote cloud server. We model the cost function C(m k , λ) as λ r m k r . Where λ r represents the confirmed price per unit computing resource allocation given by the r-th remote cloud server. Hence, the utility function of cloudlet obtained from mobile terminal k is defined as:

$$ {U_{{C_{k}}}}\left( {{m_{k}}} \right) = {c_{b}}{b_{k}} + {c_{p}}{p_{k}} + \frac{{{r_{k}}N\sum\nolimits_{r = 1}^{R} {{m_{kr}}} }}{{\sum\nolimits_{k = 1}^{K} {\sum\nolimits_{r = 1}^{R} {{m_{kr}}} } }} - \sum\limits_{r = 1}^{R} {{\lambda_{r}}{m_{kr}}} , $$
(10)

Then, the optimization problem of cloudlet can be formulated as:

$$ \begin{array}{l} \max \limits_{m_{k}^{*}} {{{U}}_{{{C_{k}}}}}\left( {{m_{k}}} \right),\\ s.t.\,\,\, \sum\nolimits_{k = 1}^{K} {{m_{kr}}} \le N, \,\,\,\,\, \forall r \in \left( {1,R} \right)\\ \,\,\,\,\,\,\,\,\,\,\,\,\,{m_{kr}} \ge 0, \,\,\, \forall k \in \left( {1,K} \right),\forall r \in \left( {1,R} \right),\\ Variable \left\{ {{m_{k}}} \right\} \end{array} $$
(11)

where \(\sum \nolimits _{k = 1}^{K} {{m_{kr}}} \le N\) means that the total requirement from the r-th remote cloud server will not exceed the VMs it has.

4.3 Remote cloud server algorithm

In this paper, the goal of remote cloud servers is to maximize their individual profit by impose a price per VM on the cloudlet. We assume all remote cloud servers are selfish game players and they constitute a non-cooperative game. We define the revenue function as their utility function. Hence, utility function of a cloud server U r is defined as:

$$ {U_{r}} = {\lambda_{r}}*{N_{r}}, $$
(12)

where \({N_{r}} = \sum \limits _{k = 1}^{K} {{m_{kr}}} \) defines the total required VMs from the r-th remote cloud server, which also means the current load of the r-th cloud server. For cloud server, they need to find the optimal VM price in order to maximize its own profit. The optimization problem for remote cloud server can be written as:

$$ \begin{array}{l} \max\limits_{\lambda_{r}^{*}} {{{U}}_{r}}\left( {{\lambda_{r}},{{\mathbf{\lambda}}_{- {\textbf{r}}}}} \right),\\ s.t.\,\,\,\, {\lambda_{r}} \ge 0, \forall r \in \left( {1,R} \right)\\ Variable \left\{ {{\lambda_{r}}} \right\} \end{array} $$
(13)

where the r-th remote cloud server per VM price λ r must larger than or equal to zero.

4.4 Problem solution

In general, backward method is the most common method to analyze the equilibrium. In this paper, we propose an iterative algorithm to obtain the triple-stage Stackelberg equilibrium. And we analyze the subgame of bandwidth and power allocation given the VM allocation and unit VM price, in which the best response function of the bandwidth and power allocation is obtained. Then the best response function of the VMs allocation at cloudlet is determined. At last, the best strategy of remote cloud server on the VM price is obtained with the aware of the equilibrium of bandwidth and computing allocation subgame.

a) The best response function of mobile terminals on bandwidth and power allocation: In this stage, the target of mobile terminal is to maximize its utility. We derive the optimal decision of the mobile terminal. For mobile terminal k, the optimal bandwidth \(b_{k}^{*}\) and the optimal power allocation \(p_{k}^{*}\) are the solutions of the optimization problem (8). In order to maximize the utility function of mobile terminals, each mobile terminal will choose a proper bandwidth and transmitting power requirement. Using the decomposition theory, by which the original problem can be decomposed into several sub optimization problems. First, we derive the optimum b k under a given p k . According to the optimum \(b_{k}^{*}\), we obtain the optimal \(p_{k}^{*}\).

The best response function of mobile terminal on bandwidth and power allocation is defined and calculated as follows.

Definition 1

\((b_{k}^{*},p_{k}^{*})\) point is defined as the best response function of mobile terminal if the utility of mobile terminal is maximized at \((b_{k}^{*},p_{k}^{*})\):

$$ \begin{array}{l} {U_{T_{k}}}\left( {b_{k}^{*},{\textbf{b}}_{{\textbf{ - k}}}^{\textbf{*}},{{\textbf{p}}^{*}}} \right) \ge {U_{T_{k}}}\left( {{b_{k}},{\textbf{b}}_{{\textbf{ - k}}}^{\textbf{*}},{{\textbf{p}}^{*}}} \right),\\ {U_{T_{k}}}\left( {p_{k}^{*},{\textbf{p}}_{{\textbf{ - k}}}^{\textbf{*}},{{\textbf{b}}^{*}}} \right) \ge {U_{T_{k}}}\left( {{p_{k}},{\textbf{p}}_{{\textbf{ - k}}}^{\textbf{*}},{{\textbf{b}}^{*}}} \right). \end{array} $$
(14)

According to the Definition 1, we have the following proposition.

Proposition 1

The best response function of mobile terminal is given by

$$ \begin{array}{l} b_{k}^{*} = \sqrt {\frac{{\sum\limits_{n = 1,n \ne k}^{K} {{b_{n}}} \left( {B - {b_{0}}} \right){{\log }_{2}}\left( {{\mathrm{1 + }}\gamma } \right){r_{b}}}}{{{c_{b}}}}} - \sum\limits_{n = 1,n \ne k}^{K} {{b_{n}}},\\ p_{k}^{*} = {\left[ {\frac{{B_{k}^{*}{r_{b}}}}{{\ln 2{c_{p}}}} - \frac{{\sum\limits_{i = 1,i \ne k}^{K} {{p_{i}}{g_{ik}} + {\sigma_{k}^{2}}} }}{{{g_{kk}}}}} \right]^ + }. \end{array} $$
(15)

Proof

For an arbitrary mobile terminal k, its utility function \({U_{T_{k}}}\) defined in Eq. 7 is a concave function of b k :

$$ \frac{{{\partial^{2}}{U_{T_{k}}}}}{{\partial {b_{k}^{2}}}} = - \frac{{2\left( {B - {b_{0}}} \right)\sum\limits_{n = 1,n\ne k}^{K} {{b_{n}}} }}{{{{\left( {\sum\nolimits_{k = 1}^{K} {{b_{k}}} } \right)}^{3}}}}{\eta_{k}}{r_{b}} < 0. $$
(16)

For given b - k and p k , the best response function of optimal bandwidth requirement can be obtained as

$$ b_{k}^{*} = \sqrt {\frac{{\sum\limits_{n = 1,n \ne k}^{K} {{b_{n}}} \left( {B - {b_{0}}} \right){{\log }_{2}}\left( {{\mathrm{1 + }}\gamma } \right){r_{b}}}}{{{c_{b}}}}} - \sum\limits_{n = 1,n \ne k}^{K} {{b_{n}}}. $$
(17)

And then taking the derivative of U k with respect to the p k and equating to zero, we have

$$ \frac{{\partial {U_{T_{k}}}}}{{\partial {p_{k}}}} = - \frac{{{B_{k}}{r_{b}}{g_{kk}}}}{{\left( {\sum\nolimits_{i = 1,i \ne k}^{K} {{p_{i}}{g_{ik}} + {\sigma_{k}^{2}} + {p_{k}}{g_{kk}}} } \right)\ln 2}} - {c_{p}} = 0, $$
(18)

the best response function of transmit power can be written as

$$ p_{k}^{*} = {\left[ {\frac{{B_{k}^{*}{r_{b}}}}{{\ln 2{c_{p}}}} - \frac{{\sum\limits_{i = 1,i \ne k}^{K} {{p_{i}}{g_{ik}} + {\sigma_{k}^{2}}} }}{{{g_{kk}}}}} \right]^ + }, $$
(19)

where \(B_{k}^{*} = \frac {{b_{k}^{*}\left ({B - {b_{0}}} \right )}}{{\sum \nolimits _{k = 1}^{K} {b_{k}^{*}} }}\). □

b) The best response function of cloudlet on computing resource allocation: Since the bandwidth and power allocation strategy is fixed at this stage, given the best response function of mobile terminal, the cloudlet can determine its best strategy of VMs allocation. The target of cloudlet is to maximize its utility defined by Eq. 11. To solve the problem (11), we have the following Proposition.

Proposition 2

For a given pricing strategy λ = (λ1 , λ 2 , ..., λ r ), the subgame of cloudlet exists Stackelberg equilibrium m k .

Proof

For cloudlet, its utility function defined in Eq. 10 is a concave function of m k since

$$ \frac{{\partial {U_{C_{k}}}}}{{\partial {m_{k}}}} = {r_{k}}\frac{{N\left( {\sum\nolimits_{k = 1}^{K} {\sum\nolimits_{r = 1}^{R} {{m_{kr}}} } } \right) - N\sum\nolimits_{r = 1}^{R} {{m_{kr}}} }}{{{{\left( {\sum\nolimits_{k = 1}^{K} {\sum\nolimits_{r = 1}^{R} {{m_{kr}}} } } \right)}^{2}}}} - {\lambda_{r}}, $$
(20)
$$ \frac{{{\partial^{2}}{U_{C_{k}}}}}{{\partial {m_{k}^{2}}}} = - \frac{{2N{r_{k}}\sum\nolimits_{\forall n \ne k} {\sum\nolimits_{r = 1}^{R} {{m_{nr}}} } }}{{{{\left( {\sum\nolimits_{k = 1}^{K} {\sum\nolimits_{r = 1}^{R} {{m_{kr}}}} } \right)}^{3}}}} < 0. $$
(21)

According to the Eq. 23, the value of m k is increased by positive value \({v_{\mathrm {k}}}\left ({{{\partial {U_{C_{k}}}\left (\tau \right )}\left /{{\partial {U_{C_{k}}}\left (\tau \right )} {\partial {m_{k}}}}\right . {\partial {m_{k}}}}} \right )\) in every iteration. Hence, \({m_{k}}(\tau + 1) = {m_{k}}\left (\tau \right ) + {v_{\mathrm {k}}}\left ({{{\partial {U_{C_{k}}}\left (\tau \right )} \left / {{\partial {U_{C_{k}}}\left (\tau \right )} {\partial {m_{kr}}}}\right . {\partial {m_{k}}}}} \right )\) and m k (τ+1)>m k (τ). The iteration continues until \(\sum \nolimits _{k = 1}^{K} {{m_{k}}\left ({\tau + 1} \right )} \) is greater than or equal to N. Let X be the maximum number of iterations required to obtain optimum VMs allocation. Then, the subgame of cloudlet finds Stackelberg equilibrium at iteration X. □

c) the best strategy of remote cloud server on VMs unit price: Based on the optimal solution of cloudlet, the optimal VMs price can be expressed by

$$ \lambda = {r_{k}}\frac{{N\sum\nolimits_{\forall n \ne k} {\sum\nolimits_{r = 1}^{R} {{m_{nr}}} } }}{{{{\left( {\sum\nolimits_{k = 1}^{K} {\sum\nolimits_{r = 1}^{R} {{m_{kr}}} } } \right)}^{2}}}}, $$
(22)

Proposition 3

The upper and lower limits of the price per VM can be represented as:

$$ \qquad\qquad\qquad\qquad{\lambda_{\min }} = \frac{{{r_{k}}\left( {K - 1} \right)}}{{{K^{2}}}}, $$
(23)

for m k =N ∀k∈K,

$$ \qquad\qquad\qquad\qquad{\lambda_{\max }} = \frac{{{r_{k}}N\left( {K - 1} \right)}}{{{K^{2}}\phi }}, $$
(24)

for m k =ϕ∀k∈K.

Proof

We know cloudlet submit the requirement of VMs to the remote cloud server. From Eq. 20, the optimal price of server exists at U c / U c m k r m k r = 0. Furthermore, we observe that the price λ is a decreasing function with respect to m k r . Taking the first derivative of the price function (shown in Eq. 22), with respect to m k r , we get,

$$ \frac{{\partial \lambda }}{{\partial {m_{kr}}}} = - \frac{{2{r_{k}}N\sum\nolimits_{\forall n \ne k} {\sum\nolimits_{r =1}^{R} {{m_{nr}}} } }}{{{{\left( {\sum\nolimits_{k = 1}^{K} {\sum\nolimits_{r = 1}^{R} {{m_{kr}}} } } \right)}^{3}}}}. $$
(25)

Finally, λ max and λ min are expressed as follow:

$$\qquad\qquad\qquad\qquad{\lambda_{\min }} = \frac{{{r_{k}}\left( {K - 1} \right)}}{{{K^{2}}}}, $$

for m k = NkK,

$$\qquad\qquad\qquad\qquad{\lambda_{\max }} = \frac{{{r_{k}}N\left( {K - 1} \right)}}{{{K^{2}}\phi }}, $$

for m k = ϕkK. □

The pseudocode of triple-stage Stackelberg game iterative algorithm is presented in Algorithm 1. In the process of cloudlet achieving Nash equilibrium, the remote cloud servers must wait and view the cloudlet’s VMs allocation and mobile terminals decision. And this waiting time is equal to the iteration time of cloud servers Δt. Hence every iteration interval time of cloud servers involves multi iteration time of cloudlet and mobile terminal Δτ and the time complexity of this algorithm is \(\mathcal {O}\left ({t\tau } \right )\). For whole network, the result of iterations is that remote cloud servers, cloudlet and mobile terminals obtain optimal pricing strategies λ , VMs allocation strategies m and bandwidth b and power allocation p strategies.

figure e

5 Numerical analysis

5.1 Parameter setting

We use Matlab software to evaluate the performance of the proposed joint wireless bandwidth and computing resource allocation scheme for the cloudlet-based MCC environment and the Stackelberg equilibrium of the triple-stage non-cooperative game. In the simulations, we assume that there are two remote cloud servers, one cloudlet and three wireless access points. The main system parameter assumptions in our simulation are adopted from [7] and listed in Table 1. Each remote cloud server is virtualized to 5 VMs. Each access point has one connected terminal. Initially, the per VM prices for two remote cloud server are p 1 = 0.1 and p 2 = 0.2, respectively. The minimum bandwidth demand of mobile terminal is b min = 4M b p s.

5.2 Numerical analysis

In this section, we first illustrate the impact of the per VM price on remote cloud servers. Figure 3 shows that the comparison of the computed utility of cloud server 1, cloud server 2 and the sum of remote cloud servers. Each cloud server’s utility increases in the process of iteration with a positive value w r( U r / U r λ r λ r ) (i.e. ∀r ∈ (1,R))and at 17-th iteration, each cloud server obtains optimal VM price and their utility functions reach maximum values. Detailed observations on how the VM prices offered by cloud server 1 and cloud server 2 affect cloud server utility is shown in Fig. 4. The utility value of remote cloud is a function of VM prices and maximum value of the cloud server is obtained when the prices of remote cloud servers are equal to 6. It means that at p 1 = p 2 = 6, the non-cooperative subgame of remote cloud reaches Stackelberg equilibrium.

Fig. 3
figure 3

The variation of cloud servers utility values with the iterative process

Fig. 4
figure 4

The variation of total cloud servers utility value under different unit prices

Figure 5 depicts the variation of mobile terminal utility values with respect to bandwidth. In this figure, we know that with the fixed prices and transmission power, the utility value of mobile terminal is a concave function, which matches the Proposition 1 in the Section 4. Hence, there exists an optimal bandwidth allocation to maximize the mobile terminal utility. The utility grows with the increase of bandwidth at the beginning and then reaches a stable level. After that, utility starts to decrease due to interference among terminals.

Fig. 5
figure 5

The variation of total terminals utility value with respect to bandwidth

In addition, we investigate how the VMs prices influence the cloudlet’s VMs allocation strategy in the proposed game. Figure 6 clearly shows a declined trend of the required VMs from different terminals with the increase of the price. The obtained VMs of three mobile terminals have higher value at lower price and with the increase of price, its gradually decrease.

Fig. 6
figure 6

The variation of three kinds of terminals’ required VMs under different unit prices

Figure 7 shows that the change of the bandwidth allocation of each mobile terminal. In this figure, we know that the final bandwidth allocation strategy of each mobile terminal in our proposed scheme is b 1 = 6.6M b p s, b 2 = 7.8M b p s and b 3 = 6M b p s. It means that the utility of terminal obtains maximum value by using this strategy and their final obtained bandwidth are larger than their own minimum demand b min = 4M b p s. The comparison of the performance between the proposed scheme and the proportional fair (PF) allocation scheme in terms of total network utility is shown in Fig. 8. The PF allocation scheme is classical compromise-based scheduling algorithm that maintaining a balance between trying to maximize total throughput and allowing all users at least a minimal level of service. Figure 8 shows that the proposed scheme gets better performance than PF algorithm and with the increase of cloud-based application service number, the proposed scheme obtains greater benefits.

Fig. 7
figure 7

Final bandwidth allocation

Fig. 8
figure 8

The total utility of network versus cloud-based application service

6 Conclusions

In this paper, we have identified and addressed the problem of joint wireless bandwidth and computing resource allocation in a cloudlet-based MCC environment. We formulated the problems of remote cloud servers’ VMs price decision, cloudlet’s computing resource allocation and mobile terminal’s bandwidth allocation as the triple-stage Stackelberg game. We also analyzed the relationship among remote clouds, cloudlet and end-users. In stage one, the remote cloud server provided the VMs selling price to the cloudlet. In Stage two, the cloudlet leased VMs from the remote cloud servers and VMs allocated to mobile users. In stage three, mobile terminals performed power and bandwidth allocation. We have investigated the existence of the Stackelberg equilibrium and developed an iterative algorithm to obtain the Stackelberg equilibrium within a limited number of iteration. Numerical analysis explains the performance of the proposed algorithm.