원시데이터 수집 시스템
선정목록으로

Management and orchestration of virtual network functions via deep reinforcement learning

관련 패션 · (24) 패션(코오롱FnC)

기본 정보

저자
  1. Joan S. Pujol Roig — Department of Electrical and Electronic Engineering, Imperial College London, London, U.K
  2. David M. Gutierrez-Estevez — Samsung Electronics R&D Institute U.K., Surrey, U.K
  3. Denız Gündüz — Department of Electrical and Electronic Engineering, Imperial College London, London, U.K
DOI
10.1109/jsac.2019.2959263
저널
IRIS UNIMORE (University of Modena and Reggio Emilia)
발행년도
2019
발행기관
University of Modena and Reggio Emilia
피인용수
69
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
http://hdl.handle.net/11380/1202572
토픽
Fuel Cells and Related Materials
OpenAlex ID
W2996431531

평가 내용

관련도
관련
사업분야
패션 · (24) 패션(코오롱FnC)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '패션 > 패션(코오롱FnC)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Management and orchestration (MANO) of re-sources by virtual network functions (VNFs) represents one of thekey challenges towards a fully virtualized network architectureas envisaged by 5G standards. Current threshold-based policiesinefficiently over-provision network resources and under-utilizeavailable hardware, incurring high cost for network operators,and consequently, the users. In this work, we present a MANOalgorithm for VNFs allowing a central unit (CU) to learnto autonomously re-configure resources (processing power andstorage), deploy new VNF instances, or offload them to the cloud,depending on the network conditions, available pool of resources,and the VNF requirements, with the goal of minimizing a costfunction that takes into account the economical cost as wellas latency and the quality-of-service (QoS) experienced by theusers. First, we formulate the stochastic resource optimizationproblem as a parameterized action Markov decision process(PAMDP). Then, we propose a solution based on deep reinforce-ment learning (DRL). More precisely, we present a novel RLapproach, called parameterized action twin (PAT) deterministicpolicy gradient, which leverages anactor-critic architecturetolearn to provision resources to the VNFs in an online manner.Finally, we present numerical performance results, and map themto 5G key performance indicators (KPIs). To the best of ourknowledge, this is the first work that considers DRL for MANOof VNFs’ physical resources.

본문 100,168자

본문 펼치기
# Management and Orchestration of Virtual Network Functions via Deep Reinforcement Learning ### Joan S. Pujol Roig 1, David M. Gutierrez-Estevez 2, and Deniz G¨und¨uz 1 1Imperial College London, London SW7 2AZ, UK 2Samsung Electronics R&D Institute UK, Surrey, TW18 4QE, UK Abstract Management and orchestration (MANO) of resources by virtual network functions (VNFs) repre sents one of the key challenges towards a fully virtualized network architecture as envisaged by 5G standards. Current threshold-based policies inefficiently over-provision network resources and under utilize available hardware, incurring high cost for network operators, and consequently, the users. In this work, we present a MANO algorithm for VNFs allowing a central unit (CU) to learn to autonomously re-configure resources (processing power and storage), deploy new VNF instances, or offload them to the cloud, depending on the network conditions, available pool of resources, and the VNF requirements, with the goal of minimizing a cost function that takes into account the economical cost as well as latency and the quality-of-service (QoS) experienced by the users. First, we formulate the stochastic resource optimization problem as a parameterized action Markov decision process (PAMDP). Then, we propose a solution based on deep reinforcement learning (DRL). More precisely, we present a novel RL approach called, parameterized action twin (PAT) deterministic policy gradient, which leverages an _actor-critic_ _architecture_ to learn to provision resources to the VNFs in an online manner. Finally, we present numerical performance results, and map them to 5G key performance indicators (KPIs). To the best of our knowledge, this is the first work that considers DRL for MANO of VNFs’ physical resources. I. INTRODUCTION Traditionally the deployment of new network functions (NFs) has been done through the acquisition and installation of a proprietary hardware running a licensed software. This fact reduces the incentives for network operators in updating their network’s physical architecture to offer new services or update existing ones, as it represents an increase in both the capital expenditures (CAPEX), i.e., equipment inversion, equipment installation and personnel training, and operational expenditures (OPEX), i.e., the cost of of operating the system [1]. To overcome this limitation, network function virtualization (NFV) has been proposed to curtail constant acquisition of technical hardware, by leveraging virtualization technology to implement NFs using general purpose computers/servers [2]. With virtualization, software implementation of a NF can be decoupled from the underlying hardware, i.e., NFs can be instantiated without the need of new equipment acquisition and installation, and they can run over commercial off the-shelf hardware. The isolation of software from hardware allows for a set of VNFs to be deployed on a shared pool of resources. This motivates a solution to manage the underlying shared infrastructure (processing power, storage, etc.) in an efficient, scalable and rapid manner. There has been a lot of work on resource allocation for cloud networks. One of the most popular ways to address resource provisioning is threshold-based reactive approaches, where resources are added or removed if the network’s condition reaches certain predefined thresholds [3]–[6]. Although this provides a simple and scalable solution to dynamic resource allocation, threshold-based criteria tend to over-provision and under-utilize network equipment (incurring high costs for the infrastructure provider) and make the management of dynamic traffic and deployment of new types of services difficult as network traffic models must be elaborated beforehand. In [7], authors study the scaling of virtual machines (VMs) in a proactive way. In particular they propose a solution via decision tree approach to resolve whether a VM instance should be _vertically_ _scaled_ ; that is, more physical resources (e.g., processing power, storage) should be added, or _horizontally_ _scaled_, i.e., by deploying a new VM instance. An autonomous vertical scaling approach is proposed in [8] using Q-learning, where an agent learns how to autonomously provision resources (storage and processing power) to a VM. With the explosion of machine learning (ML) and virtualization technologies, and their ap plications to communication networks, the idea of self-governing networks leveraging modern ML techniques is becoming popular among the communications research community. Chen et. al. [9] proposes deep double Q-learning (DDQ) and deep-SARSA solutions for mobile edge computing, where an end user terminal with limited local computation and energy resources jointly optimizes computation offloading and energy consumption selection in an autonomous manner. The end user terminal decides whether to execute a computing task locally or offload it to one or more of the available edge base stations (BSs), also selecting the amount of energy to be allocated for the task in question. A proactive VM orchestration solution is proposed in [10] using Q-learning, where, given the current state, an agent decides to increase, reduce or retain the number of VMs allocated to a VNF. In [11], a deep learning approach is introduced to decide the number of VNFs that must be deployed to meet the network traffic demands. The authors formulate a classification problem, where each class corresponds to the number of VNFs that must be instantiated to be able to cope with the current traffic, and use historical labelled traffic data to train the proposed algorithm. More recently, in the management and network orchestration (MANO) domain for wire less networks resources, the use of DRL has gained attraction for network slicing resource orchestration and management. These works formulate a discrete action selection optimization problem, and use well established value-based methods, e.g., Q-learning or SARSA, to solve the formulated problem. In this line lies the work of [12], which proposes a deep Q-learning approach to radio resource slicing and priority-based core network slicing, showing its advantage in addressing demand-aware resource allocation. In [13], authors formulate the problem of frequency bands allocation, and the problem of computation resources orchestration for different slices. These problems are reduced to choosing a particular configuration from a finite set of available configurations, which is done leveraging DDQNs. Similarly, in [14], a DRL solution based on DDQN is presented for multi-tenant cross-slice resource orchestration, where again, a discrete number of communication and computation resources have to be allocated to different slice tenants. Finally a deep deterministic policy gradient (DDPG) with advantage function is employed in [15] to allocate bandwidth resources to different network slices. Compared to the aforementioned approaches, the continuous nature of DDPG allows for more fine-grained resource allocation. In our work, we consider 3GPP functional split, where a central unit (CU) deploys and maintains a set of VNFs serving the users of several distributed units (DUs). We first formulate the dynamic allocation of processing and storage resources to VNFs as a Markov decision process (MDP). The optimal solution for this problem is elusive due to prohibitively large state and action spaces. Therefore, we present a novel deep reinforcement learning (DRL) algorithm, called _parameterized_ _action_ _twin_ (PAT), where we use DDPG [16] and its novel variant called twin delayed DDPG [17], as well as ideas from the parameterized action Markov decision process (PAMDP) as in [17], [18], so that an agent placed at the CU is trained to learn whether to scale vertically (add processing power and storage), horizontally (instantiate new VNFs), or to offload (send the VNFs to the cloud) based on the system state (service request arrivals, service rates, service level agreement (SLA), etc.), using a cost function that combines the economic cost, SLA requirements, and the latency experienced by the users. The proposed algorithm is deployed in a variety of scenarios and its performance is evaluated according to a defined set of 5G key performance indicators (KPIs). The feasibility of the proposed solution relies on the assumption that the technology envisaged for NF virtualization is _“containerization”_ [19], where containers perform operating-system-level virtualization, i.e., every time a VNF is launched a container is deployed in a physical server. A “container” _is a lightweight, standalone, executable package of software that includes everything_ _needed_ _to_ _run_ _an_ _application:_ _code,_ _runtime,_ _system_ _tools,_ _system_ _libraries_ _and_ _settings_ _and_ _its_ _run_ _by_ _the_ _operating_ _system_ _kernel_ [20]. Containers are isolated from one another and can communicate with each other through well-defined channels. We find containers to be a more appropriate virtualization technology, compared to others, such as VMs, as they require less power [21], take less start-up and re-scaling time [22], [23], and, most importantly, can be rescaled on-the-fly without disrupting the service they provide. Due to the use of an actor-critic architecture, our approach is a joint policy and action value-based optimization, which generally shows better convergence properties [16] compared to value-based approaches implemented in [9], [10], [12]–[14]. Moreover, Q-learning and SARSA are used for discrete action selection [24], which is not feasible for the continuous control problem addressed in this work. Although a continuous action space is considered in [15], it focuses on the allocation of a single resource (bandwidth), while we consider the allocation of two continuous resources plus a discrete action for server selection. In contrast to [10], we consider not only horizontal scaling but also vertical scaling, as well as offloading, significantly increasing the complexity of the problem. Furthermore, our algorithm works in an online manner, i.e., dynamically adapting to the network traffic, which differs from [11], where the algorithms are trained using historic labelled data and cannot adapt to new types (i.e., classes) of traffic that differs significantly from the training set. Moreover, in disagreement with what is stated in [11] for reinforcement learning (RL) approaches, our approach can use unlabelled historical data to learn, as we are interested in the network patterns (captured by the historical arrival and service times) to update the critic value-function estimates accordingly. Finally, in comparison with the cloud management algorithm presented in [7], using deep neural networks (DNNs) for function approximation can handle a higher dimensional state space, which would be challenging to be captured using decisions trees due to the exponential growth in the number of leaves. The remainder of this paper is organized as follows: In Section II the system model is introduced. The problem formulation using a Markov decision process (MDP) framework is presented in Section III. In Section IV we provide an overview of the RL notation, and review the works upon which our approach is based. The proposed PAT algorithm used to train the agent is explained in Section V. Numerical results illustrating the performance of the PAT algorithm are presented in Section VI. Finally a summary of the results and conclusions is presented in Section VII. <u>Notation: [</u> _·_ ] <sup>_T_</sup> denotes the transpose operation. 1( _x_ ) denotes the logical operator, which equals to 1 if x is true, and 0 otherwise. For positive integer K, [ _K_ ] denotes the set _{_ 1 _,_ 2 _, . . ., K}_ . 1 _N_ denotes the vector of 1s of size N. For set _A_, we denote its power set, i.e., the set of all subsets of _A_ by 2 <sup>_A_</sup> . We define the function _clip_ ( _x, xmin, xmax_ ) ≜ max _{xmin,_ min _{xmax, x}}_ . II. SYSTEM MODEL We consider a radio access network (RAN) with the 3GPP CU-DU functional split, consisting of _B_ small-cell BSs (the DUs), denoted by _B_ = _{_ B1 _,_ B2 _, . . .,_ BB _}_, connected to a CU that is in charge of the MANO of the NFs, such as transfer of user data, mobility control, RAN sharing, positioning, session management, etc. The BSs work as remote radio heads (RRHs), i.e., relaying all its traffic to the CU. Let _N_ = _{_ N0 _, . . .,_ NN _−_ 1 _}_ denote the set of distinct heterogeneous NFs offered by the CU that can be instantiated by any traffic requirement in the network. Based on the users’ traffic requirements from _Bi, i ∈_ [ _B_ ], the CU deploys and maintains a subset of VNFs from set _N_ . See Figure 1 for an illustration of the network model. We envisage an autonomous CU that has a local pool of resources that can be used to instantiate new VNFs, or to maintain deployed ones. The pool of local resources consists of _K_ servers denoted by _{_ S1 _, . . .,_ SK _}_, each with a limited processing and storage capability. We assume homogeneity across servers, such that each _Sk_, _k_ _∈_ [ _K_ ], has the same storage size of _ηmaxF_ bits and a central processing unit (CPU) of capability _ρmaxC_ Hz. In addition to the local servers, the CU can also employ resources located at a cloud center by offloading VNFs to the cloud, albeit at an increased cost which will be specified later. We consider a central cloud with an infinite capacity resource pool, and denote it by _SK_ +1, so the set of available resources to the CU is denoted by _K_ = _{_ S1 _, . . .,_ SK+1 _}_ . Fig. 1: Considered system architecture. We consider a slotted resource allocation scheme, where new users arriving at the system wait until the start of the next slot to be allocated resources. Thus, the time horizon is discretized into decision epochs, corresponding to slots of duration _T_, and are indexed by an integer _t_ _∈_ N <sup>+</sup> . At the beginning of each decision epoch, the CU decides how to allocate the network resources so that the VNFs can operate in the most agile and efficient way. We denote by _N_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _⊂N_, the set of active VNFs maintained by the CU during epoch _t_ . The dependency on _t_ of _N_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> emphasizes the fact that VNFs can be added or removed from the set of services provided by any BS overtime. Let us refer to _ρ_ <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_≤_</sup> <sup>_ηmax_</sup> <sup>as</sup> <sup>the</sup> <sup>total</sup> <sup>processing</sup> <sup>power</sup> <sup>and</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>_≤_</sup> <sup>_ρmax_</sup> <sup>and</sup> <sup>_η_</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> storage, respectively, of server _Sk_ being used at epoch _t_ . The CU is connected to the cloud via a dedicated link of capacity _R_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> Mbps. We denote by _Nk,j_ the instance of _Nj_ deployed at server _Sk_, and allow only for one instance of each VNF to be deployed in a server. We consider two main physical resources to be provisioned to the VNFs, CPU and memory, and assume that NF instance _Nk,j, ∀j_ _∈_ [ _N_ ], at epoch _t_ uses _c_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_C_</sup> <sup>Hz</sup> <sup>of</sup> <sup>CPU</sup> <sup>capability</sup> <sup>and</sup> _k,j_ _k,j_ _m_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_B_</sup> <sup>bits of storage, at server</sup> <sup>_Sk_</sup> <sup>,</sup> <sup>_k_</sup> <sup>_∈_</sup> <sup>[</sup> <sup>_K_</sup> <sup>+1], where</sup> <sup>_c_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_∈_</sup> - _<u>c</u>_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_, c_</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> - and _m_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_∈_</sup> - _<u>m</u>_ <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>_, m_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> . Thus, each VNF has a different resource range in which it can operate following the definition of an _elastic_ _NF_, which refers to a VNF whose QoS _gracefully_ degrades with the scarcity of resources [25]. The range of CPU and memory resources VNF _Nk,j_ is able to operate at is given by:  <u></u> <u></u> <u></u> <u></u> <u></u> <u></u> <u></u> <u></u> <u></u> _<u>c</u>_ <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>=</sup> <sup>_cj,_</sup> <sup>0 + (</sup> <sup>_cj,r −_</sup> <sup>∆</sup> <sup>_cj,d_</sup> <sup>)</sup> <sup>_u_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _<u>c</u>_ <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>=</sup> <sup>_cj,_</sup> <sup>0 + (</sup> <sup>_cj,r_</sup> <sup>+ ∆</sup> <sup>_cj,d_</sup> <sup>)</sup> <sup>_u_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _<u>c</u>_ <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> _k,j_ _<u>c</u>_ <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _k,j_ _,_ (1) _<u>m</u>_ <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> _k,j_ <u></u> <u></u> <u></u> <u></u> <u></u> <u></u> <u></u> ~~~~ <u></u> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>=</sup> <sup>_mj,_</sup> <sup>0 + (</sup> <sup>_mj,r −_</sup> <sup>∆</sup> <sup>_mj,d_</sup> <sup>)</sup> <sup>_u_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>=</sup> <sup>_mj,_</sup> <sup>0 + (</sup> <sup>_mj,r_</sup> <sup>+ ∆</sup> <sup>_mj,d_</sup> <sup>)</sup> <sup>_u_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _<u>m</u>_ <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _k,j_ where _u_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>denotes</sup> <sup>the</sup> <sup>number</sup> <sup>of</sup> <sup>users</sup> <sup>being</sup> <sup>served</sup> <sup>by</sup> <sup>VNF</sup> <sup>instance</sup> <sup>_Nk,j_</sup> <sup>at</sup> <sup>epoch</sup> <sup>_t_</sup> <sup>;</sup> <sup>_cj,_</sup> <sup>0</sup> <sup>and</sup> _mj,_ 0 represent the offset CPU and memory requirements, respectively, that do not depend on the number of users being served. The variables _cj,r_ and _mj,r_ account for the linear increment of CPU and memory per user being served by the particular deployment of _Nj_ in server _Sk_ . Values ∆ _cj,d_ and ∆ _mj,d_ are referred as the _elastic_ _service_ _coefficients_, and define the resource range under which the VNF is able to operate. The QoS of the _u_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>users</sup> <sup>served</sup> <sup>by</sup> <sup>the</sup> <sup>instance</sup> <sup>of</sup> <sup>VNF</sup> <sup>_Nk,j_</sup> <sup>is</sup> <sup>denoted</sup> <sup>by</sup> <sup>QoS</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>,</sup> <sup>and</sup> depends on the resources allocated to this VNF instance. VNF _Nj_, _j_ _∈_ [ _N_ ], has a minimum QoS requirement, QoS <sup>_min_</sup> _j_, that must always be ensured as specified by the SLA, and a maximum perceived QoS, QoS <sup>_max_</sup> _j_ . We assume that QoS <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>as</sup> <sup>a</sup> <sup>function</sup> <sup>of</sup> <sup>_m_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_c_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>is</sup> <sup>given</sup> <sup>by</sup> <sup>the</sup> <sup>following</sup> <sup>piecewise</sup> function: QoS <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>=</sup> QoS <sup>_max_</sup> _<u>j</u>_           <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>or</sup> <sup>_m_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_> m_</sup> _k,j_ <sup>~~(~~</sup> <sup>_t_</sup> <sup>)</sup> <sup>_max_</sup> _j_ _,_ if _c_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_m_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ QoS <sup>_max_</sup> _j_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_> c_</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> 0 _,_ if _c_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_< c_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_< m_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ _<u>j</u>_ _~~<u>k</u>~~_ _<u>,j</u>_ _,_ <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> _<u>j</u>_ <sup>_max_</sup> _<u>r</u>_ <sup>(</sup> _~~<u>k</u>~~_ <sup>_t_</sup> _<u>,j</u>_ <sup>)</sup> <sup>~~(~~</sup> _<u>k,j</u>_ <sup>_t_</sup> <sup>)</sup> <sup>_−_</sup> <sup>QoS</sup> _<u>j</u>_ <sup>_max_</sup> �min _{m_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_, m_</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_}_</sup> <sup>+ min</sup> <sup>_{c_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> QoS <sup>_min_</sup> _<u>j</u>_ <sup>_min_</sup> _<u>j</u>_ _<u>r</u>_ <sup>~~(~~</sup> _<u>k,j</u>_ <sup>_t_</sup> <sup>)</sup> _<u>j</u>_ _~~<u>k</u>~~_ _<u>,j</u>_ _<u>r</u>_ <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_−r_</sup> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_−r_</sup> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_, c_</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_}_</sup> + _,_ (2)          <sup>_max_</sup> _<u>j</u>_ _−_ QoS <sup>_min_</sup> _<u>j</u>_ _<u>j</u>_ _<u>j</u>_ _<u>r</u>_ <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_−r_</sup> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_−r_</sup> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> _~~k~~_ _,j_ otherwise where we defined _<u>r</u>_ <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>≜</sup> <sup>_<u>c</u>_</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>+</sup> <sup>_<u>m</u>_</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_<u>r</u>_</sup> _~~k~~_ <sup>(</sup> <sup>_t_</sup> _,j_ <sup>)</sup> _~~k~~_ <sup>(</sup> <sup>_t_</sup> _,j_ <sup>)</sup> <sup>≜</sup> <sup>_<u>c</u>_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>+</sup> <sup>_<u>m</u>_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>.</sup> <sup>We</sup> <sup>see</sup> <sup>that</sup> <sup>_Nk,j_</sup> <sup>satisfies</sup> <sup>the</sup> <sup>SLA</sup> <sup>if</sup> and only if _m_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_≥_</sup> <sup>_<u>m</u>_</sup> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>(</sup> _~~k~~_ <sup>_t_</sup> _,j_ <sup>)</sup> <sup>and</sup> <sup>_c_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_≥_</sup> <sup>_<u>c</u>_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>as</sup> <sup>these</sup> <sup>result</sup> <sup>in</sup> <sup>QoS</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_≥_</sup> <sup>QoS</sup> _j_ <sup>_min_</sup> _j_ <sup>_min_</sup>, and that additional resources beyond _<u>c</u>_ <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>~~(~~</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_<u>m</u>_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>do</sup> <sup>not</sup> <sup>have</sup> <sup>an</sup> <sup>impact</sup> <sup>on</sup> <sup>the</sup> <sup>QoS</sup> <sup>perceived</sup> <sup>by</sup> <sup>the</sup> <sup>users,</sup> <sup>which</sup> saturates at QoS <sup>_max_</sup> _j_ . Furthermore, Eqn. (2) the fact that the QoS is the same for all the users being served by the same VNF instance _Nk,j_, i.e., _u_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>.</sup> <sup>The</sup> <sup>CU</sup> <sup>can</sup> <sup>also</sup> <sup>offload</sup> <sup>VNFs</sup> <sup>to</sup> <sup>the</sup> cloud, in which case the CU’s local pool are not used. <sup>(</sup> _k,_ <sup>_t_</sup> <sup>)</sup> 1 <sup>_, . . ., m_</sup> <sup>(</sup> _k,N_ <sup>_t_</sup> <sup>)</sup> _k,N_ _k,N_ We define c <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>≜</sup> - _c_ <sup>(</sup> _k,_ <sup>_t_</sup> <sup>)</sup> 1 <sup>(</sup> _k,_ <sup>_t_</sup> <sup>)</sup> 1 <sup>_, . . ., c_</sup> <sup>(</sup> _k,N_ <sup>_t_</sup> <sup>)</sup> �⊺ and m <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>≜</sup> �⊺. Finally, the matrices C <sup>(</sup> <sup>_t_</sup> <sup>)</sup> ≜ - _m_ <sup>(</sup> _k,_ <sup>_t_</sup> <sup>)</sup> 1 <sup>(</sup> 1 <sup>_t_</sup> <sup>)</sup> <sup>_, . . .,_</sup> <sup>c</sup> <sup>(</sup> _K_ <sup>_t_</sup> <sup>)]</sup> <sup>and</sup> <sup>S</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>=</sup> <sup>[</sup> <sup>m</sup> 1 <sup>(</sup> <sup>_t_</sup> <sup>)</sup> [ c <sup>(</sup> 1 <sup>_t_</sup> <sup>)</sup> 1 <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_, . . .,_</sup> <sup>m</sup> <sup>(</sup> _K_ <sup>_t_</sup> <sup>)]</sup> <sup>represent</sup> <sup>the</sup> <sup>overall</sup> <sup>CPU</sup> <sup>and</sup> <sup>memory</sup> <sup>allocations</sup> across all the K servers at epoch _t_, such that _ρ_ <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>= 1</sup> <sup>_N_</sup> <sup>_·_</sup> <sup>c</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> and _ηk_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k_ <sup>= 1</sup> <sup>_N_</sup> <sup>_·_</sup> <sup>m</sup> _j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _j_ <sup>(</sup> <sup>_t_</sup> <sup>).</sup> The number of new service requests from all the BSs for VNF _Nj, j_ _∈_ [ _N_ ], in epoch _t_, is denoted by _n_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _j_ <sup>,</sup> <sup>and</sup> <sup>is</sup> <sup>assumed</sup> <sup>to</sup> <sup>follow</sup> <sup>an</sup> <sup>independent</sup> <sup>and</sup> <sup>identically</sup> <sup>distributed</sup> <sup>(i.i.d.)</sup> homogeneous Poisson process with parameter _λ_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _j_ <sup>_t_</sup> <sup>);</sup> <sup>in</sup> <sup>other</sup> <sup>words,</sup> <sup>the</sup> <sup>probability</sup> <sup>of</sup> <sup>_n_</sup> _j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> new demands to arrive at the CU for VNF _Nj_ in epoch _t_ for a time-slot of duration _T_ is given by: - _n_ j <sup>(t)</sup> T _._ (3) = - _λ_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _j_ <sup>_T_</sup> j e <sup>_−λ_</sup> <sup>(t)</sup> _n_ ! _P_ - _n_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> = _n_ Remark 1. In order to capture slow variations of network traffic over time, we consider time varying _λ_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> values, obtained by sampling a Gaussian distribution with parameters _µj_ and _σj_ and taking the maximum between the obtained value and 0, i.e., _λ_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> = max _{x,_ 0 _}_ where _x_ _∼N_ ( _µj, σj_ ). We assume value of _λj_ is kept constant for a block of _tmax_ time slots, and changes to an independent realization from the aforementioned truncated Gaussian distribution for the next block. Remark 2. The value of _R_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> is also obtained by sampling a truncated Gaussian distribution. Its values is given by _R_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = max _{x, Rmin}_ where _x ∼N_ ( _µr, σr_ ). We model users’ service times by a geometric distribution; i.e., at the end of each time slot a user will remain in the system with probability _pj_, and will leave the system with probability 1 _−_ _pj_, so the expected service time of a user is 1 _/pj,_ _∀j_ _∈_ [ _N_ ]. There are three objectives the CU may want to optimize simultaneously: latency, financial cost and service quality. In order to simplify this multi-objective optimization problem we let the CU to minimize the long-term cost formed as a weighted combination of these three objectives. Next we explain each of these costs. _Latency_ _(_ _δ_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _Tk,j_ <sup>_)_</sup> <sup>_:_</sup> <sup>The</sup> <sup>latency</sup> <sup>cost</sup> <sup>associated</sup> <sup>with</sup> <sup>VNF</sup> <sup>instance</sup> <sup>_Nk,j_</sup> <sup>during</sup> <sup>epoch</sup> <sup>_t_</sup> <sup>is</sup> <sup>due</sup> to three potential causes of latency: _•_ VNF resizing latency - _δr_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> �: This latency is associated with resizing the containers. Re sizing a VNF consists of varying the amount of allocated CPU and memory resources. Docker allows to resize containers on-the-fly by using the command docker update (from Docker v1.11.1). We consider that any instantiated container incurs a delay of _δr,c_ per unit _C_ of CPU added/removed, and _δr,m_ per block of memory of size _F_ added/removed. Thus, the VNF instance _Nk,j_ resizing latency is given by: <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_m_</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> _r_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> <sup>=</sup> <sup>_|c_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> _|δr,m._ (4) _δr_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_−_</sup> <sup>_c_</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> _|_ <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> _|δr,c_ + _|m_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _•_ Deployment latency - _δ_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _dk,j_ _•_ Deployment latency - _δ_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _d_ : When a new VNF _Nk,j_ is instantiated on a server _Sk, k_ _∈_ [ _K_ ], we consider a boot-up delay of _δd,b_ per container. The total deployment latency of instance _Nk,j_ is given by <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>_>_</sup> <sup>0</sup> _δ_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _dk,j_ <sup>= 1</sup> - _c_ <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> = 0 and _c_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _δd,b._ (5) _•_ Offloading latency - _δoffK_ +1 _,j_ �: If a VNF instance is decided to be deployed on the cloud, in order to keep the service running, a continuous flow of information between the cloud and the CU is retained until the VNF is terminated. This communication incurs a total latency of _δoffK_ +1 _,j_ = 2 _<u>mK</u>_ +1 _,jB/R_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> (6) for the offloaded VNF. Once a VNF is deployed in the cloud, we consider that the maximum resource utilization is guaranteed _<u>r</u>_ <sup>~~(~~</sup> _j_ <sup>_t_</sup> <sup>)</sup> _K_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> +1 _,j_ <sup>= QoS</sup> <sup>_max_</sup> <sup>.</sup> <sup>~~(~~</sup> _j_ <sup>_t_</sup> <sup>),</sup> <sup>so</sup> <sup>that</sup> <sup>QoS</sup> _K_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> The total latency incurred by VNF instance _Nk,j_ at epoch _t_ is given by: _δd_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> <sup>+</sup> <sup>_δ_</sup> _r_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> _r_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> <sup>_,_</sup> <sup>if</sup> <sup>_k_</sup> <sup>_∈_</sup> <sup>[</sup> <sup>_K_</sup> <sup>]</sup> _._ (7) _δT_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_·_</sup> _T_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> <sup>=</sup> <sup>_u_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup>   _δoffK_ +1 _,j_ _,_ otherwise    _δd_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> All the users, being served by instance _Nk,j_ experience the same latency, and hence the scaling by _u_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>,</sup> <sup>the</sup> <sup>number</sup> <sup>of</sup> <sup>users</sup> <sup>being</sup> <sup>served</sup> <sup>for</sup> <sup>each</sup> <sup>instance.</sup> _Financial_ _Cost_ _(_ _C_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _Tk,j_ <sup>_)_</sup> <sup>_:_</sup> <sup>A</sup> <sup>price</sup> <sup>model</sup> <sup>that</sup> <sup>takes</sup> <sup>into</sup> <sup>account</sup> <sup>the</sup> <sup>economic</sup> <sup>implications</sup> <sup>of</sup> each _Nk,j_ VNF instance configuration is developed. _•_ Resource cost - _Cr_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> �: We consider a financial cost of _Cr,m_ per B bits of memory per epoch and _Cr,p_ per _C_ units of CPU resource per epoch for server _Sk, k_ _∈_ [ _K_ ], i.e., _r_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>=</sup> <sup>_c_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _Cr_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_Cr,p_</sup> <sup>+</sup> <sup>_m_</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_Cr,m._</sup> (8) _•_ Server cost - _C_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _ik,j_ : Every time a server _Sk, k_ _∈_ [ _K_ ], is powered on, we consider a one-time payment of _Ci,_ 0 plus a rental cost of _Ci,v_ per epoch. Hence the server cost is given by: - - _<u>Ci,v</u>_ 1 _N_ c <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>_>_</sup> <sup>0</sup> _N_ <sup>_._</sup> (9) - _<u>Ci,</u>_ <u>0</u> _N_ <sup>+ 1</sup> _C_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _ik,j_ <sup>= 1</sup> _C_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _ik,j_ �1 _N_ c <sup>(</sup> _k_ <sup>_t−_</sup> <sup>1)</sup> = 0 and 1 _N_ c <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>_>_</sup> <sup>0</sup> _•_ Cloud cost� _Cc_ <sup>(</sup> _K_ <sup>_t_</sup> <sup>)</sup> +1 _,j_ ): The financial cost of offloading a VNF to the cloud is modelled as a one-time payment of _Cc,_ 0 plus a rental payment of _Cc,v_ per user per epoch until the VNF is terminated. Thus the cloud cost of VNF _Nj_ is given by: <sup>(</sup> _K_ <sup>_t_</sup> <sup>)</sup> +1 _,j_ <sup>_>_</sup> <sup>0</sup> _Cc,_ 0 + _<u>mK</u>_ +1 _,jCc,v._ (10) _Cc_ <sup>(</sup> _K_ <sup>_t_</sup> <sup>)</sup> +1 _,j_ <sup>= 1</sup> - _c_ <sup>(</sup> _K_ <sup>_t−_</sup> +1 <sup>1)</sup> _,j_ <sup>(</sup> _K_ <sup>_t−_</sup> +1 <sup>1)</sup> _,j_ <sup>= 0</sup> <sup>and</sup> <sup>_c_</sup> <sup>(</sup> _K_ <sup>_t_</sup> <sup>)</sup> The total financial cost of VNF instance _Nk,j_ at epoch _t_ is given by: _r_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>+</sup> <sup>_C_</sup> _i_ <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> _i_ <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> <sup>if</sup> <sup>_k_</sup> <sup>_∈_</sup> <sup>[</sup> <sup>_K_</sup> <sup>]</sup> _,_ (11) _r_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>=</sup> <sup>_u_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _Cr_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_·_</sup>    _Cr_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _Cc_ <sup>(</sup> _K_ <sup>_t_</sup> <sup>)</sup>   _c_ <sup>(</sup> _K_ <sup>_t_</sup> <sup>)</sup> +1 _,j_ <sup>_,_</sup> <sup>otherwise</sup> _Service_ _Level_ _Agreement_ _(_ _SLA_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_)_</sup> <sup>_:_</sup> <sup>Each VNF</sup> <sup>instance</sup> <sup>_Nk,j_</sup> <sup>,</sup> <sup>_k_</sup> <sup>_∈_</sup> <sup>[</sup> <sup>_K_</sup> <sup>]</sup> <sup>_j_</sup> <sup>_∈_</sup> <sup>[</sup> <sup>_N_</sup> <sup>], is</sup> <sup>associated</sup> with a minimum QoS requirement, QoS <sup>_min_</sup> _j_, and the failure to provision resources accordingly might incur service disruption, which violates the SLA. Accordingly, we define the SLA cost at VNF instance _Nk,j_ as �QoS <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_<_</sup> <sup>QoS</sup> _j_ <sup>_min_</sup> _j_ - _u_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> _SLA_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>=</sup> _γj_ 1 - _−_ QoS <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> (12) <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>)</sup> where QoS <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>is</sup> <sup>the</sup> <sup>perceived</sup> <sup>QoS</sup> <sup>of</sup> <sup>VNF</sup> <sup>_Nj_</sup> <sup>at</sup> <sup>server</sup> <sup>_Sk_</sup> <sup>,</sup> <sup>and</sup> <sup>_γj_</sup> <sup>is</sup> <sup>the</sup> <sup>penalty</sup> <sup>for</sup> <sup>not</sup> fulfilling QoS _j_ . Furthermore, the SLA cost scales with the number of users being served by the VNF instance _Nk,j_ as all of them experience the same QoS. As it is going to be detailed later, our models tries to minimize a cost function; and thus, we would like to reinforce the good actions that lead to higher QoS by reducing the cost or by even making it negative. To this end, we define the SLA cost to be inversely proportional to the perceived QoS. Furthermore, the whole of users served by the VNF instance experience the same SLA cost, that is why, this cost is again scaled by the number of users _u_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>.</sup> We remark that, in order to capture the impact of reconfiguration of a VNF container on the whole network, each objective cost function is scaled by the number of users, such that a reconfiguration that affects more users is penalized/rewarded more than those affecting less users. _Network Cost_ _:_ We define the overall network cost as the total cost incurred by all the instances deployed in the network at decision epoch _t_, defined as: _,_ (13) _k∈_ [ _K_ +1] <sup>_ω_</sup> <sup>1</sup> <sup>_δ_</sup> _T_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ [ _K_ +1] <sup>_ω_</sup> <sup>1</sup> <sup>_δ_</sup> _T_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _Tk,j_ _k,j_ <sup>+</sup> <sup>_ω_</sup> <sup>3</sup> <sup>_SLA_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <u>�</u> <u>�</u> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ _k,j_ <sup>+</sup> <sup>_ω_</sup> <sup>3</sup> <sup>_SLA_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>+</sup> <sup>_ω_</sup> <sup>2</sup> <sup>_C_</sup> _T_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _C_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _T_ <sup>=</sup> _j∈N_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _j∈N_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <u>�</u> _k∈_ [ _K_ +1] <sup>_uk,j_</sup> where the weights _ω_ 1 _, ω_ 2 _, ω_ 3 _∈_ R <sup>+</sup> are fixed weights independent of the VNF and the server. These weights can be tuned based on the preferences of the network operator, e.g., a network operator might be more concerned about reducing the economic cost rather than providing a high quality service, etc. The normalization by the number of users is to balance the network cost between heavy and low traffic periods. Without such a normalization busy traffic periods would incur higher costs regardless of the CU’s performance. _VNF_ _Instance_ _Cost_ _:_ For purposes that will be explained in Section IV, we define the VNF instance cost _C_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>incurred</sup> <sup>by</sup> <sup>instance</sup> <sup>_Nk,j_</sup> <sup>at</sup> <sup>epoch</sup> <sup>_t_</sup> <sup>,</sup> <sup>as</sup> <sup>follows:</sup> _._ (14) _Tk,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _uk,j_ _k,j_ <sup>+</sup> <sup>_ω_</sup> <sup>2</sup> <sup>_C_</sup> _T_ <sup>(</sup> <sup>_t_</sup> _k,j_ <sup>)</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _C_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>=</sup> _ω_ 1 _δT_ ( _t_ ) _k,j_ ( _t_ ) _k,j_ _k,j_ <sup>+</sup> <sup>_ω_</sup> <sup>3</sup> <sup>_SLA_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> This cost measures the contribution of a particular VNF instance to the global network cost. III. PROBLEM FORMULATION In this section, we formulate the resource allocation problem as a MDP. We envisage an autonomous CU with the goal of minimizing the long-term cost. To this end, we define the state space and the set of actions that the CU can take at each decision epoch. _A._ _MDP_ At each decision epoch of a MDP an agent observes a state _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _∈S_, where _S_ is the state space, and selects and action _a_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _∈A_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)�</sup>, where _A_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> is the set of all possible actions in state _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> . is referred as the action space. Action _a_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> in state _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> incurs a certain Set _A_ = _∪s_ ( _t_ ) _∈SA_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> , where _R_ : _S ×A →_ R denotes the cost function, and the agent transitions to a cost _R_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _, a_ <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> new state _s_ <sup>(</sup> <sup>_t_</sup> <sup>+1)</sup> _∈S_ with probability _p_ _s_ <sup>(</sup> <sup>_t_</sup> <sup>+1)</sup> _| s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _, a_ <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> _∈P_, where _P_ : _S × A × S_ _→_ [0 _,_ 1] is a probability kernel. At each interaction, the agent maps the observed state _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> to a probability distribution over the action set _A_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> . This MDP model is thus characterized by the 4-tuple _⟨s, a, r, p_ ( _s_ <sup>_′_</sup> _| s, a_ ) _⟩_ . This mapping specifies the _policy_ of the agent, and is denoted by _π_ . The probability of selecting action _a_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _a_ in state _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _s_ is given by _π_ ( _a | s_ ). The _state-value_ _function_ _Vπ_ ( _s_ ) for policy _π_ at state _s_ is defined as the expected discounted cost the agent would accumulate starting at state _s_ following policy _π_ : _Vπ_ ( _s_ ) = <sup>_._</sup> E _π_ - _∞_ - _γ_ <sup>(</sup> <sup>_t−_</sup> <sup>1)</sup> _R_ _t_ =1 _._ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _, π_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)��</sup> _| s_ <sup>(1)</sup> = _s_ where 0 _≤_ _γ_ _≤_ 1 is the discount factor that determines how far into the future the CU “looks”, i.e., _γ_ = 0 corresponds to a “myopic” CU, that focus only on its immediate cost, while _γ_ = 1 represents an CU concerned with the cost over the whole time horizon. The action-value function, also referred as Q-function, is defined as: _Qπ_ ( _s, a_ ) = <sup>_._</sup> E _π_ - _∞_ _k_ =0 _._ _γ_ <sup>_k_</sup> _R_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>+</sup> <sup>_k_</sup> <sup>)</sup> _, π_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>+</sup> <sup>_k_</sup> <sup>)��</sup> _| s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _s, a_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _a_ We define the optimal value function, _V_ <sup>_∗_</sup> ( _s_ ), as the minimum expected total discounted cost obtained starting in state _s_ and following the optimal policy: _V_ <sup>_∗_</sup> ( _s_ ) = min _π_ <sup>E</sup> <sup>_π_</sup> <sup>[</sup> <sup>_Vπ_</sup> <sup>(</sup> <sup>_s_</sup> <sup>)]</sup> <sup>_._</sup> (15) The goal is to find a policy _π∗_ whose value function is the same as the optimal value function _Vπ∗_ ( _s_ ) = _V_ <sup>_∗_</sup> . Next, we define the state and action spaces for our problem. _B._ _State_ _Space_ The network state space is the set of all possible configurations of the network. The state at epoch _t_ consists of: 1) the number of arrivals for each VNF - _n_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> 2) deployed VNFs _N_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> . _j∈N_ <sup>.</sup> 3) number of users being served by VNF _Nj_ at each server, _u_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>.</sup> 4) cloud link capacity, _R_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> . 5) CPU resources allocated to each VNF at each server, C <sup>(</sup> <sup>_t_</sup> <sup>)</sup> . 6) memory resources allocated to each VNF at each server, S <sup>(</sup> <sup>_t_</sup> <sup>)</sup> . The network state at epoch _t_ is characterized by _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _S_, where _j∈N_ _n_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> _∈_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> <sup>_N_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> _u_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> <sup>C</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> <sup>S</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_, R_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> _k∈K,j∈N_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> <sup>C</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> <sup>S</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_, R_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> _×_ 2 <sup>_N_</sup> _×_ ��Z <sup>+�</sup> <sup>_K×N_</sup> <sup>�</sup> _×_ _S_ = ��Z <sup>+�</sup> <sup>_N_</sup> <sup>�</sup> - _{_ 0 _, . . ., ρmax}_ <sup>_N×K_</sup> <sup>�</sup> _×_ - _{_ 0 _, . . ., ηmax}_ <sup>_K_</sup> <sup>�</sup> _×_ R <sup>+</sup> _._ (16) _C._ _Action_ _Space_ We consider three distinct ways the CU can react to variations in the workload: _vertical_ _scaling_, _horizontal_ _scaling_ and _offloading_ . The CU actions are taken at the user level, that is, the CU selects an action for each user request arriving at the system. This allows the CU to allocate users requesting the same VNF to different servers. Following [26], we employ a PAMDP formulation, where a discrete action set is defined as _AD_ = _{a_ 1 _, a_ 2 _, . . ., aD}_, and each action _a_ _∈AD_ is associated with _na_ continuous parameters - _p_ <sup>_a_</sup> 1 <sup>_, . . ., pa_</sup> _na_ �, _p_ <sup>_a_</sup> _i_ <sup>_∈_</sup> <sup>R.</sup> <sup>Thus,</sup> <sup>each</sup> <sup>tuple</sup> - _a, p_ <sup>_a_</sup> 1 <sup>_, . . ., pa_</sup> _na_ - represents a distinct action, and the �. In our problem, the first discrete component action space is given by _A_ = _∪a∈AD_ - _a, p_ <sup>_a_</sup> 1 <sup>_, . . ., pa_</sup> _na_ - _a, p_ <sup>_a_</sup> 1 denotes the server at which the user is assigned to, while the remaining continuous components denote how the associated resources are updated. _Vertical_ _Scaling_ _:_ The vertical scaling action space, denoted by _AV_ = [ _K_ ], refers to actions adding resources to, or removing from, a deployed VNF container instance at epoch _t_ [7]. Taking into account the traffic fluctuations and VNF requirements, a CU might decide to increase (decrease) the CPU, and/or memory resources allocated to a deployed VNF instance independently, i.e., the memory allocation can be increased while the CPU allocation is decreased, or vice-versa. Hence, we define the vertical scaling actions separately for the CPU and memory resources, as _p_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_p_</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>),</sup> <sup>respectively,</sup> <sup>as</sup> <sup>the</sup> <sup>change</sup> <sup>in</sup> <sup>the</sup> <sup>allocated</sup> <sup>resources</sup> <sup>with</sup> <sup>respect</sup> to time slot _t −_ 1. We have    <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> <sup>_∈_</sup> _k_ _p_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> - _i · B_ _|_ _i ∈_ R _,_ _−ρ_ <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>_≤_</sup> <sup>_i ≤_</sup> <sup>_ρmax −_</sup> <sup>_ρ_</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> _k_ _p_ <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> _._ (17) - _i · C_ _|_ _i ∈_ R _,_ _−ηk_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_≤_</sup> <sup>_i ≤_</sup> <sup>_ηmax −_</sup> <sup>_η_</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup>   <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>_∈_</sup> Vertical scaling is limited by the resources of the physical server in which a container is deployed, thus, the limitation of _ρmax −_ _ρ_ <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>).</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> and _±ηmax −_ _ηk_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> Note that the parameters _p_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>represent increment/decrement of the resources already</sup> <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_p_</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>=</sup> <sup>_c_</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_s_</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>);</sup> <sup>hence,</sup> <sup>_p_</sup> _CPU_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> allocated to VNF _Nj_ at server _Sk_, i.e., _c_ <sup>(</sup> _k,j_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> + _p_ <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> _k,j_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>=</sup> <sup>_s_</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> <sup>(</sup> _k,j_ <sup>_t−_</sup> <sup>1)</sup> + _p_ <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> _k,j_ _k,j_ _CPU_ and _p_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _M_ <sup>can</sup> <sup>also</sup> <sup>take</sup> <sup>negative</sup> <sup>values.</sup> <sup>As</sup> <sup>mentioned</sup> <sup>before,</sup> <sup>all</sup> <sup>the</sup> <sup>users</sup> <sup>of</sup> <sup>a</sup> <sup>server’s</sup> <sup>VNF</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _M_ <sup>can</sup> <sup>also</sup> <sup>take</sup> <sup>negative</sup> <sup>values.</sup> <sup>As</sup> <sup>mentioned</sup> <sup>before,</sup> <sup>all</sup> <sup>the</sup> <sup>users</sup> <sup>of</sup> <sup>a</sup> <sup>server’s</sup> <sup>VNF</sup> instance equally share the allocated resources, thus, all of them are affected by the reshuffling of resources. _Horizontal_ _Scaling_ _:_ Horizontal scaling refers to the deployment of new containers to support an existing VNF _Nj_ at epoch _t_ . If the load of a VNF increases, and the CU estimates that server _k_ at epoch _t_ + 1 will not be able to support its operation the CU might create another instance of the same VNF in another server. We have _AH_ = [ _K_ ] and    <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> <sup>_∈_</sup> _k_ _p_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> - _i · B_ _|_ _i ∈_ R _,_ _−ρ_ <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> <sup>_≤_</sup> <sup>_i ≤_</sup> <sup>_ρmax −_</sup> <sup>_ρ_</sup> <sup>(</sup> _k_ <sup>_t_</sup> <sup>)</sup> _k_ _p_ <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> _,_ (18) - _i · C_ _|_ _i ∈_ R _,_ _−ηk_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_≤_</sup> <sup>_i ≤_</sup> <sup>_ηmax −_</sup> <sup>_η_</sup> _k_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup>   <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>_∈_</sup> where _k_ denotes the server at which a new VNF instance is to be deployed using horizontal scaling. _p_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>_p_</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>account</sup> <sup>for</sup> <sup>the</sup> <sup>amount</sup> <sup>of</sup> <sup>CPU</sup> <sup>and</sup> <sup>memory</sup> <sup>resources</sup> <sup>to</sup> <sup>be</sup> <sup>allocated</sup> for the new deployment of _Nk,j_ at server _k_ . _Work_ _offloading_ _:_ If the CU foresees that it cannot cope with a traffic fluctuation by scaling vertically or horizontally, it can decide to offload a VNF to the cloud. We define the offloading action as _A_ <sup>(</sup> _off_ <sup>_t_</sup> <sup>)</sup> <sup>.</sup> <sup>This</sup> <sup>action</sup> <sup>is</sup> <sup>not</sup> <sup>associated</sup> <sup>with</sup> <sup>any</sup> <sup>parameter</sup> <sup>due</sup> <sup>to</sup> <sup>the</sup> <sup>assumption</sup> <sup>of</sup> unlimited CPU and memory resources at the cloud. _Parametrized_ _Action_ _Space_ _:_ Following the PAMDP notation the complete parameterized action space at epoch _t_ is given by - _A_ <sup>(</sup> _off_ <sup>_t_</sup> <sup>)</sup> _,_ (19) - _A_ <sup>(</sup> _H_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _H_ <sup>_t_</sup> <sup>)</sup> <sup>_, p_</sup> _CPU_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _CPU_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_, p_</sup> _M_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _M_ _CPU_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_, p_</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> <sup>_,_</sup> _A_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> ≜ - _A_ <sup>(</sup> _V_ <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _V_ <sup>_t_</sup> <sup>)</sup> <sup>_, p_</sup> _CPU_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _∪_ _∪_ so that the CU action taken at epoch _t_, _a_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _∈A_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> . The cost function for our problem has been defined in Section II in detail. Note that the CU’s action at each time slot consists of _nj_ ( _t_ ) actions in the PAMDP formulation, one for each user request. Note that the randomness in our problem is due to random users arrivals for each VNF, and the random service time for each user in the system. If these statistics are known, the optimal policy can be identified through dynamic programming (DP), e.g., by the value iteration algorithm. However, estimating these probabilities for our problem, which has large state and action spaces is prohibitive, making the DP solution practically infeasible. Hence, we will instead exploit DRL to find an approximation to the optimal value function. IV. REINFORCEMENT LEARNING FOR VNF MANAGEMENT In the RL method used in this work, the agent does not necessarily exploit (or even know) the transition probabilities governing the underlying MDP as it learns directly a policy as well as the action-value functions based on its past experience (model-free). The formulated problem suffers from the curse of dimensionality due to the prohibitively large size of the state and action spaces (continuous state space). Therefore, we employ the actor-critic method with NNs as a function approximation to parametrize the policy, and allows the learning agent to directly search over the action space. Another DNN is employed to approximate the state-value functions, which are used as feedback to determine how good the current policy is. _A._ _Deep_ _Reinforcement_ _Learning_ _(DRL)_ The use of DNNs as general function approximators have been proven to work very well in a wide range of areas, such as computer vision, speech recognition, natural language processing and recently wireless networks [27]. Traditional RL methods struggle to address real-world problems due to their high complexity. In these problems, high-dimensional state spaces need to be managed in order to obtain a model that can generalize past experiences to new states. For example, tabular Q-Learning uses a hash table to store the estimated cost of state-action pairs, so for continuous input states, even if quantizated, this solution deems intractable, since even with modest 5-level quantization and a state vector of size N, 5 <sup>_N_</sup> entries would have to be stored ( _≈_ 10 <sup>13</sup> entries if _N_ = 20). DRL aims to solve this problem by employing NNs as function approximators to reduce the complexity of classical RL methods. In [28] authors introduce deep Q-learning network (DQN), where a DNN is used as a function approximator for action selection on a discrete action space, based on Q-Learning. Given a state, Q-Learning updates the action-value estimate with the immediate reward plus a weighted version of the highest Q-estimate for the next state. Using a combination of 3 convolutional layers (for computer vision) and two fully connected layers (Q-learning part), they obtain human-level results for a wide range of Atari games. Further architectures based on DQN have been proposed, such as Duelling DQN [29], where there are two distinct DNNs, one to estimate _Vπ_ ( _s_ ) and the other to estimate the so-called _advantage_ function _Aπ_ ( _s, a_ ) = _Qπ_ ( _s, a_ ) _−_ _Vπ_ ( _s_ ). These methods work well for a continuous state space but are limited to discrete action space, suffering from the curse of dimensionality when the action space is large. To overcome the limitation of discrete action selection, in [16] the idea of DQN is extended to continuous action spaces using the deterministic policy gradient (DPG) theorem [30], in particular the deep-DPG (DDPG) method. DDPG extends the use of DNN to the actor-critic method leveraging off-policy learning, where a deterministic policy is learned using a combination of _replay_ _buffer_ and _target_ _networks_ to ensure stability and a zero-mean Gaussian noise is added to the actions for action space exploration. In [17] it is shown that DDPG may lead to overestimated action-value estimates, thereby to suboptimal policies. To overcome this problem, authors present a novel method called twin delayed DDPG (TD3). A novel actor-critic architecture is proposed which comprises two critic networks, hence, two different Q-functions are learned, and the smaller of the two estimates is used as the update rule for the critics. The proposed algorithm adds clipped noise to the target action to make it harder for the policy to exploit Q-function errors. They also propose to update the targets and the policy less frequently than the Q-functions, helping to reduce the variance. Given the high dimensionality of both the state and the action spaces in our model we propose a solution that leverages DNNs as policy and action-value function approximators, while exploiting the results from [17] for continuous action selection. To this end, we implement a novel architecture for PAMDP to address the problem defined in Section III. V. ACTOR-CRITIC METHOD IN PAMDP In the proposed approach, the actor-critic method is leveraged, which is a combination of value based and policy optimization approaches. It combines the benefits of both methods as the critic estimates the action-value function _Qφ_ ( _s, a_ ), while the actor derives a policy _πθ_ ( _s_ ) critically using the value estimates of the critic to update the policy. In this section we present our novel approach that implements the actor-critic method for a PAMDP, which we call the parameterized action twin (PAT). The proposed PAT algorithm is presented in Algorithm 1. For ease of notation in the rest of the section we will refer to _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _s_, _s_ <sup>(</sup> <sup>_t_</sup> <sup>+1)</sup> = _s_ <sup>_′_</sup>, _a_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _a_, = _r_ . _R_ - _s_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _, a_ <sup>(</sup> <sup>_t_</sup> <sup>)�</sup> _A._ _VNF_ _MANO_ _meets_ _PAT_ Before detailing the proposed RL algorithm, we clarify its integration into the CU, and how it interacts with the environment described in Section II, as we believe it will ease the comprehension of the algorithm. At the beginning of each decision epoch _t_, we randomly select a VNF and we proceed to serve its new arrived users. The random selection of VNF is motivated by fairness, so that we avoid starting the process of resource allocation (when more resources are available) with always the same VNFs. Following the random VNF selection, we iterate over all requests of this VNF to allocate the network resources using the PAT method. For resource allocation, a snapshot of the network state is used as input to the PAT method. Based on the network state, the proposed RL algorithm decides the actions to be taken and from which server/cloud the user is served. After the allocation, a new updated snapshot of the network state is obtained and the agent cost described in Section V-C is computed. These transitions are stored in the memory buffer of the agent and will later be used to train the PAT algorithm, so that it adapts to previously seen as well as new traffic patterns. Even if a VNF does not have any new requests, we nevertheless select that VNF and apply the PAT algorithm for action selection so that, in case it was already deployed, resources can be added or removed; if not, the VNF can be deployed ahead of future traffic. In this last case, the VNF instance only incurs an economical cost as the number of users being serve is 0. _B._ _Parameterized_ _Action_ _Twin_ _(PAT)_ _algorithm_ Following [17], we use two critics in order to obtain two distinct estimates of the action values; thus, two different DNNs, parameterized by _φ_ 1 and _φ_ 2, are used to estimate two different action-value functions. The aim of the two critic networks, as explained in [17], is to avoid overestimation. We find that clipping the critics’ updates to the minimum between the two estimates yields better policies. Note that this update rule might introduce underestimation bias; however, we find it more convenient in the long term to avoid convergence to suboptimal policies. Two more DNNs, parameterized by _θ_ 1 and _θ_ 2, are used for the policy parameterization of the actor. The goal of the first actor network is to select the discrete action _a_ based on the current state _s_, while the second network generates the continuous action parameters _p_ = [ _p_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)]</sup> <sup>_T_</sup> <sup>(</sup> _CPU_ <sup>_t_</sup> <sup>)</sup> <sup>_, p_</sup> <sup>(</sup> _M_ <sup>_t_</sup> <sup>)</sup> based on the outcome of the first actor network _a_ and the current system state _s_ . Thus, the joint selection ( _a, p_ ) determined by two distinct networks, in contrast to the approach in [18], where a single DNN architecture is used to determine both, the action and the parameters associated with it. We find this architecture to reflect a more natural process of action selection by first deciding the discrete action _a_, and then, choosing the associated parameters _p_ as defined in Subsection III-C. We use a stochastic policy for discrete action selection while deterministic policy is leveraged for parameter selection, which we denote by _µ_, i.e., parameters _θ_ 2 map state and action ( _s, a_ ) to parameters _µθ_ 2( _s, a_ ) = _p_ . Figure 2 illustrates the DNNs structure and the flow of information. Finally, four more DNNs are employed, corresponding to the mirroring target networks, and are parametrized by _φ_ <sup>_−_</sup> 1 <sup>_,_</sup> <sup>_φ_</sup> <sup>_−_</sup> 2 <sup>_,_</sup> <sup>_θ_</sup> 1 <sup>_−,_</sup> <sup>_θ_</sup> 2 <sup>_−_</sup> <sup>, respectively. Their function is explained later in this section.</sup> _1)_ _Parameter Updates:_ The critics take the network state _s_ and the action ( _a, p_ ), and estimate the value function _Qφi_ ( _s, a, p_ ), _i_ = 1 _,_ 2. As is typical in actor-critic methods, we use off-policy temporal difference of 0, i.e., TD(0), for action-value function approximation, with clipped update Fig. 2: The information flow between different DNNs in the proposed architecture. rules as below: - _s_ <sup>_′_</sup> _, µθ_ 1 _−_ ��� 1 _−_ <sup>_,_</sup> <sup>(</sup> <sup>_s′_</sup> <sup>)</sup> _−_ _Q_ <sup>_t_</sup> _φ_ <sup>_t_</sup> _φi_ <sup>(</sup> <sup>_s, a, p_</sup> <sup>)</sup> _,_ _Q_ <sup>_t_</sup> _φ_ <sup>+1</sup> _i_ _φ_ <sup>_t_</sup> _i_ <sup>(</sup> <sup>_s, a, p_</sup> <sup>)+</sup> <sup>_α_</sup> _φ_ <sup>_−_</sup> _i_ <sup>_t_</sup> _φ_ <sup>+1</sup> _i_ <sup>(</sup> <sup>_s, a, p_</sup> <sup>) =</sup> <sup>_Q_</sup> _φ_ <sup>_t_</sup> _r_ + _γ_ min _i_ =1 _,_ 2 _Q_ <sup>_t_</sup> _i_ - _s_ <sup>_′_</sup> _, µθ_ 1 _−_ <sup>(</sup> <sup>_s′_</sup> <sup>)</sup> <sup>_, µθ_</sup> 2 <sup>_−_</sup> (20) which minimizes the following loss function, for _i_ = 1 _,_ 2: _LQφi_ ( _s, a, p_ ) = <sup><u>1</u></sup> 2 _r_ + _γ_ min _i_ =1 _,_ 2 _Qφ−i_ - _s_ <sup>_′_</sup> _, µθ_ 1 _−_ <sup>(</sup> <sup>_s′_</sup> <sup>)</sup> <sup>_, µθ_</sup> 2 <sup>_−_</sup> 1 _−_ <sup>_,_</sup> <sup>(</sup> <sup>_s′_</sup> <sup>)</sup> ��� _−_ _Qφi_ ( _s, a, p_ ) - _s_ <sup>_′_</sup> _, µθ_ 1 _−_ �2 _._ (21) The action-value functions of the critics are learned through gradient descent with the update rule: <sup>_t_</sup> _i_ <sup>(</sup> <sup>_s, a, p_</sup> <sup>)</sup> <sup>_._</sup> - _s_ <sup>_′_</sup> _, µθ_ 1 _−_ <sup>(</sup> <sup>_s′_</sup> <sup>)</sup> <sup>_, µθ_</sup> 2 <sup>_−_</sup> ��� 1 _−_ <sup>_,_</sup> <sup>(</sup> <sup>_s′_</sup> <sup>)</sup> _−_ _Qφti_ _ti_ <sup>(</sup> <sup>_s, a, p_</sup> <sup>)</sup> _∇φti_ _φ_ <sup>_t_</sup> _i_ <sup>+1</sup> <sup>_t_</sup> _i_ <sup>+</sup> <sup>_α_</sup> <sup>_t_</sup> _i_ <sup>+1</sup> = _φ_ <sup>_t_</sup> _i_ _r_ + _γ_ min _i_ =1 _,_ 2 _Qφ−i_ - _s_ <sup>_′_</sup> _, µθ_ 1 _−_ _ti_ <sup>_Qφt_</sup> _i_ (22) The critics estimations of the joint action and parameters are gathered by the actors to update the policy. In continuous action space, the greedy update of the policy becomes infeasible as it requires a global maximization at every step, and going through all the action space to maximize the estimated expected return is infeasible. Following [30], we use the critics’ network’s gradient that indicates the direction the global Q-value estimate increases, to update the policy parameters. In order to obtain the gradients, we need to perform back-propagation through one of the critics network (we chose critic 1). It must be noted here that this gradient is not the conventional gradient over the network parametrization but with respect to the input, such that for the action network _θ_ 1 the update rule is _,_ (23) _θ_ 1 <sup>_t_</sup> <sup>+1</sup> 1 <sup>_t_</sup> <sup>+1</sup> = _θ_ 1 <sup>_t_</sup> 1 <sup>_t_</sup> <sup>+</sup> <sup>_α_</sup> <sup>E</sup> <sup>_s∼ρ_</sup> _θ_ 1 _∇θ_ 1 _µθ_ 2 ( _s_ ) _∇aQφ_ 1 ( _s, a, p_ ) �� _a_ = _µθ_ 1 ( _s_ ) while the update rule for network _θ_ 2 is _θ_ 2 <sup>_t_</sup> <sup>+1</sup> 2 <sup>_t_</sup> <sup>+</sup> <sup>_α_</sup> <sup>E</sup> <sup>_s∼ρ_</sup> _θ_ 2 2 <sup>_t_</sup> <sup>+1</sup> = _θ_ 2 <sup>_t_</sup> _∇θ_ 2 _µθ_ 2 ( _s, a_ ) _∇pQφ_ 1 ( _s, a, p_ ) �� _p_ = _µθ_ 2 ( _s,a_ ) _,_ (24) where _s ∼_ _ρθi_ refers to the trajectory sample using network _i_ . _2)_ _Stabilizing_ _updates:_ Once both the critic and the actor networks are updated, the target networks should also be updated. Target networks are used to stabilize the updates. If the same _φ_ 1 = _φ_ 2 = _φ_ network is used for bootstrapping ( i.e., estimating the value function of the next state _Q_ ( _s_ <sup>_′_</sup> _, a_ <sup>_′_</sup> )) and estimating _Q_ ( _s, a_ ) in (20), the _φ_ network will be updated with each iteration to move closer to the target Q-values; but, at the same time, the target Q-values, which are given by the same network, will also be changing in the same direction, like a dog chasing its tail. By introducing the target networks, we reduce this constant movement of the target estimates by delaying its update. The rule to update the target networks is given by    _φ_ <sup>_−_</sup> _i_ _i_ <sup>_t_</sup> <sup>+ (1</sup> <sup>_−_</sup> <sup>_τ_</sup> <sup>)</sup> <sup>_φ_</sup> _i_ <sup>_−_</sup> _i_ _,_ (25) _θi_ <sup>_−_</sup> _i_ <sup>_t_</sup> <sup>+ (1</sup> <sup>_−_</sup> <sup>_τ_</sup> <sup>)</sup> <sup>_θ_</sup> _i_ <sup>_−_</sup> _i_   <sup>_−_</sup> _i_ <sup>=</sup> <sup>_τφ_</sup> _i_ <sup>_t_</sup> _i_ <sup>_−_</sup> <sup>=</sup> <sup>_τθ_</sup> _i_ <sup>_t_</sup> where _τ_ _≤_ 1 is an hyper-parameter used to regulate the speed at which the target networks are updated. Another tool to stabilize the network parameter updates is the memory buffer _M_ . The memory buffer stores the interactions of the agent with the environment, to be more precise, we store on-step trajectories, i.e., _s, a, r, s_ <sup>_′_</sup> . Once the memory is filled with enough samples ( _≈_ 100 _K_ ), we uniformly sample the memory to obtain mini-batches of size _N_ = samples which are used to compute the losses of the actor and critic. The idea behind the use of a memory buffer is that, most optimization algorithms, including gradient descent, assume that the samples, from which the gradient estimate is obtained, are i.i.d. Clearly this is not the case in the defined environment; however, by sampling uniformly from the memory buffer the correlation between consecutive samples is reduced, leading to a more stable optimization of the action-parameter selection. _3)_ _Exploitation vs. exploration:_ Any RL algorithm using deterministic policy entails the trade off between exploitation and exploration. For discrete action selection, we use the _ϵ −_ _greedy_ policy to ensure exploration, where with probability _ϵ_ a random action is selected by sampling a uniform random distribution over all possible discrete actions. A high value for _ϵ_ is set at the beginning to encourage exploration, but its value is reduced gradually over time until it reaches a certain minimum _ϵmin_, where it remains stable. Ensuring the exploration of all possible continuous parameters is not possible. We use the approach proposed in [17], where a clipped zero-mean Gaussian noise is constantly added to the parameter selection policy (see Eqn. (26)). This approach is motivated by the assumption that similar parameters should have similar costs and thus, similar estimates; and the noise addition is used to encourage exploration. After the addition of noise the parameter values are clipped to the allowed range [ _pmin, pmax_ ], as defined in Section III-C. _µ_ <sup>_′_</sup> ( _s, a_ ) = clip ( _µθ_ 2 ( _s, a_ ) + _w, pmin, pmax_ ) _,_ (26) - _,_ �0 _, σ_ <sup>2�</sup> _, −c, c_ _w_ _∼_ clip - _N_ where _σ_ and _c_ are hyperparameters. Similarly to the _ϵ_ parameter for the action selection, we gradually reduce the value of _c_, until it reaches a minimum value _cmin_ . _4)_ _Architecture:_ The DNN architectures for the action, action parameter, and critic networks are the same. For all the networks, the inputs are processed by three fully connected layers consisting of 128-64 units respectively. Each fully connected layer is followed by a rectified linear unit (ReLU) activation function with negative slope 10 <sup>_−_</sup> <sup>2</sup> . The weights of the fully connected layers are initialized using Xavier [31] initialization with a standard deviation of 10 <sup>_−_</sup> <sup>2</sup> . The input of the actor action network is the network state, and connected to its final inner product layer there are _K_ + 1 linear outputs corresponding to the discrete action selection ( _K_ servers plus the cloud). For the actor parameter network, the last layer comprises an hyperbolic tangent activation function scaled by _pmax_ and _ηmax_ with two outputs, corresponding to the CPU and memory values allocated to the discrete action selected, while its inputs are the state and the selected action. Finally the critic network gathers the state, action, and the action parameters, and a single output value is obtained, the estimate of _Q_ ( _s, a, p_ ). We use ADAM optimizer for both the actor and the critic, with a learning rate of _lr_ . _C._ _Agent_ _Cost_ _Function_ In Section II, and more precisely in Eqn. (13), we defined the global network cost as the main metric this work aims to minimize. However, we do not directly use (13) as the metric the agent optimizes, as we found it to be too general to guide the agent in its initial learning steps towards finding resource allocation policies that lead to good results. The goal of this subsection is to define the cost function Ψ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> that we use to provide feedback to the agent regarding its actions. Individual actions taken by the agent have direct impact in the VNF performance of the selected instance and then a lighter contribution on the total network performance. Thus, in order to guide the agent to learn to allocate resources to different VNF instances, we use the VNF instance cost of (14). However, the minimization goal of this work is the total network cost, hence, we need to include it in the global picture. To this end we define the cost as follows: Ψ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = <sup>_C_</sup> _<u>k,j</u>_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _<u>k,j</u>_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>+</sup> <sup>_βC_</sup> _<u>T</u>_ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _,_ (27) _<u>T</u>_ Γ _max_ where Γ _max_ is a hyperparameter that guarantees Ψ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> _∈_ [ _−_ 1 _,_ 1], while _β_ determines how much the agent accounts for the total network cost. Eqn. (27) is what we use in the DNN training, while Eqn. (13) is the objective function which is the aim of this work. Furthermore, during the training phase, the proposed RL approach needs to learn the physics of the environment, that is, at the beginning of the learning process the agent might try to add/subtract more CPU or memory to a server than the one that is available/possible. In order to teach the agent the environment’s physical limitations, whenever the algorithm outputs an infeasible action we offload the user to the cloud, and impose a cost of Ψ <sup>(</sup> <sup>_t_</sup> <sup>)</sup> = _−_ 1. VI. NUMERICAL RESULTS In this section we present numerical results obtained with the PAT method described in Section V. We start by presenting the DRL benchmarks to test the proposed algorithm, followed by the experimental setup and the parameters used in the simulations. _A._ _DRL_ _benchmarks._ In order to assess the quality of the proposed algorithm, we compare the PAT agent with other DRL benchmark algorithms. _•_ Greedy: For each new user in the system, the _greedy_ algorithm checks whether the new user’s VNF is already deployed in one of the CU servers. If so, computes the CPU and memory that the server would need to allocate to that VNF such that the new and existing users can be served from that VNF instance, i.e.,the resulting VNF’s QoS lies in the range between _QoS_ <sup>_min_</sup> and _QoS_ <sup>_max_</sup> . If server’s available resources allow for the calculated VNF resizing, the VNF is resized, and the user is allocated to that server (vertical scaling). If not, another server is checked until resources for the new user can be assigned (horizontal scaling). If no server is able to allocate this new user, the new user is offloaded to the cloud. _•_ Cloud: This approach offload all the traffic to the cloud. _•_ DRL benchmarks : To overcome the problem of discrete and continuous action selection formulated in this work, we use two distinct state of the art DRL algorithms. For server selection, discrete action, we use DDQN, while for parameter selection we use the following algorithms: 1) DDPG [30] with an hyperbolic tangent activation function in the outer layer scaled by the maximum values of the CPU and memory, respectively. 2) A3C [32], where the output of the DNNs provide the mean and variance values of the Gaussian distributions used to sample the values of the CPU and memory. The parameter _T_ of [32], is chosen to be 128. 3) DDQN [28], where we discretize the CPU and memory action, with a resolution of 5, meaning that the total number of actions is given by _ηmax/_ 5 _× ρmax/_ 5. The DDQN for discrete action selection, and the previous set of algorithms are trained recursively (discrete action network training first, followed by parameter network training) for 1000 times. Each algorithm interacting with the environment a 10000 time-slots. _B._ _Parameters_ In our experimental setup, we consider _N_ = 10 VNFs that can be instantiated by the users to be deployed in the network, with features shown in Table I. We consider a CU with _K_ = 10 servers each with a CPU capability of 50 _C_ Hz ( _ρmax_ = 50) and memory capacity of 50 _B_ bits ( _ηmax_ = 50). The arrival rates ( _λ_ <sup>(</sup> _j_ <sup>_t_</sup> <sup>))</sup> <sup>for</sup> <sup>different</sup> <sup>VNFs</sup> <sup>at</sup> <sup>each</sup> <sup>epoch</sup> <sup>are</sup> <sup>sampled</sup> <sup>from</sup> <sup>a</sup> normal distribution, where each of the VNFs is characterized by different mean and variance values, listed in Table I. The values of the other parameters involved in the calculation of the cost function and those used to reinforce the actor behaviours are given in Table II. The PAT algorithm parameters are collected in Table III. We note that the values presented in Tables I, II and III for the numerical simulations are chosen as reasonable values that would lead VNF TABLE I: VNF resource requirements. CPU Memory QoS Others Mean variance _c_ 0 _cr_ _cd_ _s_ 0 _sr_ _sd_ _QoSmin_ _QoSmax_ _γj_ _µj_ _σj_ _N_ 1 3 5 4 6 5 3 35 70 2 2 1.5 _N_ 2 2 3 2 4 4 2 36 80 2 2.5 0.2 _N_ 3 1 4 2 2 3 2 27 63 2 4 0.5 _N_ 4 1 4 3 1 3 1 40 90 2 1 1 _N_ 5 2 6 2 3 4 3 20 100 2 2.5 1 _N_ 6 1 2 1 0 3 2 5 30 2 2 1.5 _N_ 7 2 3 2 2 5 3 56 80 2 5 1 _N_ 8 3 4 2 3 6 5 20 53 2 2 1 _N_ 9 1 4 3 4 4 2 40 90 2 3 0.5 _N_ 10 2 6 2 3 4 3 20 100 2 2 1 TABLE II: Delay parameters. Delay ( _ms_ ) _δr,c_ = 3 _δr,s_ = 4 _δd,b_ = 20 _δd,t_ = 10 Cost ( _m_ $ ) _Cr,s_ = 3 _Cr,p_ = 6 _Ci,o_ = 2 _Ci,v_ = 1 _Cc,_ 0 = 1 _Cc,v_ = 3 to a solution with a balanced allocation of available resources in the servers and the cloud. Naturally, the value of these parameters in practice depends highly on the implementation and the technology used (memory/CPU capability) as well as the VNFs being considered; however, our problem formulation is general, and we have reached similar observations with a large variety of parameter values considered. _C._ _PAT_ _performance_ The proposed PAT algorithm is run using 10 different seeds, and the average learning curves are depicted in Figure 3. Given the cost function in (13), it can be seen that the agent maximizes the SLA to the point where the cost function is negative, meaning that the perceived QoS is greater than the weighted combination of the latency and the economical costs. Thus, given the predefined cost function, the agent learns to minimize the cost and to utilize the servers in an online manner. That is, since the agent generates its own dataset on the fly, by interacting with the environment, variations in the environment are directly fedback into the model by adding new traces into the memory buffer. Therefore, when a statistically significant change occurs, this is captured by the model. Discount factor _γ_ = 0 _._ 99 Target update _τ_ = 5 _·_ 10 <sup>_−_</sup> <sup>3</sup> _ϵ_ = 0 _._ 8 Learning rate _lr_ = 10 <sup>_−_</sup> <sup>3</sup> _ϵmin_ = 0 _._ 05 Policy noise _σ_ = 0 _._ 2 _ϵdecay_ = 10 <sup>_−_</sup> <sup>3</sup> _c_ = 0 _._ 5 ( _ω_ 1 _, ω_ 2 _, ω_ 3)= (1 _,_ 1 _,_ 2) _cmin_ = 0 _._ 1 _Rmin_ = 1 _β_ = 0 _._ 2 _tmax_ = 100 Γ _max_ = 100 Fig. 3: Evolution of the network cost in TABLE III: PAT parameters. _D._ _Mapping_ _to_ _KPIs_ Eqn. (13). We now define three KPIs for MANO in 5G networks, and map the results obtained with the PAT algorithm to these KPIs. The following KPIs are of interest for future 5G networks [33]: _•_ <u>Resource</u> <u>utilisation</u> <u>efficiency:</u> Given the CPU and memory resources, resource utilisation efficiency is defined as the ratio of utilized resources with respect the total available resources for the execution of a VNF, for a particular number of users. With the elastic functions employed in our model, the system should achieve a higher resource utilisation efficiency, since it can shelter a much larger number of users over the same physical infrastructure. _•_ <u>Cost</u> <u>efficiency</u> <u>gain:</u> This metric captures the average cost of deploying and maintaining the network infrastructure to provide the required service to its users. Given the elastic nature of the VNFs deployed, the CU should be able to optimally dimension the network such that less resources are required to support the same services; in addition, the elastic system should avoid the usage of unnecessary resources. _E._ _PAT_ _evaluation_ In Figure 4 and 5, we present the results of the proposed PAT approach and that of the other benchmark algorithms. The comparison is carried out under exactly the same traffic patterns, i.e., same arrival and departure times. From Figures 4(a), 4(b) and 5(c) it can be observed that the particular set of parameters chosen for this network configuration entails that users offloaded to the cloud experience higher delays than the users served by the CU. On the contrary, for the financial cost, VNFs instantiated in the CU have a higher cost than VNFs instantiated in the cloud. That explains why the scheme with lowest cloud utilization, i.e., greedy, has the lowest delay per user but the highest financial cost per user. Furthermore, Figure 5(c) shows how all the DRL algorithms decide to allocate more users to the cloud than the CU, this is mainly for two reasons affecting the learning process: 1) <u>The</u> <u>VNF</u> <u>cloud</u> <u>allocation</u> <u>does</u> <u>not</u> <u>carry</u> <u>any</u> <u>penalty.</u> Contrary to VNF allocation in the CU, where algorithms are penalised if the physical limitations of the servers are not respected or allocated resources are not enough to fulfill the SLA, the deployment of VNFs at the CU carry a positive reward. 2) <u>The</u> <u>QoS</u> <u>drives</u> <u>the</u> <u>learning</u> <u>experience.</u> Since _ω_ 3 is greater than the other two weights scaling the costs functions defined in Eqn. (13) and (14), algorithms aim to maximize SLA cost (given the RL reward function of (27)). Thus, as allocating VNF to CU may lead to lower QoS if the CU fails to provide the maximum demanded resources, the DRL tends to use the cloud where _QoS_ <sup>_max_</sup> is guaranteed. _1)_ _Resource_ _utilisation_ _efficiency:_ A comparison of the resource utilisation is presented in Figure 5. The figure shows that the PAT algorithm leads to a more efficient usage of the CPU and memory resources compared to A3C, DDPG and DDQN, as for a similar CPU and memory utilization (Figures 5(a) and 5(b)) a lower amount of traffic is offloaded to the cloud (Figure 5(c)). The efficient usage of resources accomplished by PAT is also visible in Figures 4(a) and 4(b), where even though similar resources are being utilized by the the other DRL algorithms, the latency cost and the financial cost achieved by the PAT are lower (on average). The greedy approach aims to allocate as many users as possible to the CU, that is why its CU resources are fully utilised most of the time and the average delay of the users is the lowest, while its financial cost is the highest. (a) Latency cost (Eqn. (7)). (b) Financial cost (Eqn. (11)). (c) SLA cost (Eqn. (12)). (d) Network cost (Eqn. (13)). Fig. 4: Defined costs comparison between PAT and the other DRL benchmarks. The shaded regions demonstrate the standard deviation of the average evaluation over 10 trials. _2)_ _Cost_ _efficiency_ _gain:_ The comparison between the averaged economical cost of the PAT deployment and the other schemes is presented in Figure 4(b), where a gain in economical cost by the PAT algorithm is clearly visible. The economical cost difference between the PAT and the greedy is straightforward, as the network configuration used entails a higher cost for the use of CU resources. The reduction of financial cost of the PAT compared to the other DRL algorithms is because the latter allocate more CPU and memory than needed, given the fact that most of their traffic is directed to the cloud, such that the CU resources are underutilized, incurring higher cost per user. (a) CPU utilization. (b) Memory utilization. (c) Cloud utilization. Fig. 5: Resource utilization. _3)_ _Network_ _Cost:_ Figure 4(d) shows that the proposed PAT algorithm outperforms the other approaches on the main metric of this work, the network cost defined in Eqn. 13. The PAT finds a middle point, between directing traffic to the CU and offloading it to the cloud. One of the reason that the proposed approach outperforms DRL benchmarks is that the optimization of the server selection and the resource allocation is done jointly. Contrary to A3C, DDQN and DDPG, where the training is done by iterations, the PAT algorithm propagates the gradient of the value-estimates obtained by the critics to the parameter network and the server selection network at the same time, pushing both networks to more optimal points simultaneously, improving the efficiency of each training update. Fig. 6: Network cost with constants _λj_ . It is somewhat surprising that the greedy algorithm performing comparably, or sometimes even better than the baseline DRL algorithms at some time periods. This is because the DRL algorithms, in contrast to PAT, have delays in adapting to the randomness of the environment, or tend to slightly over-provision resources to be able to cope with highly time-variant traffic demands. If, however, we keep the traffic statistics (arrival rates) constant, we can see in Figure 6 that baseline DRL algorithms outperform greedy, although PAT is still the best performing algorithm. This shows that PAT not only outperforms other baselines in exploiting the resources in the most efficient manner in a static environment, but also is the fastest in terms of adapting to variations in the environment. VII. CONCLUSIONS AND FUTURE WORK We presented a novel DRL algorithm for autonomous management and orchestration of VNFs, where the CU learns to re-configure resources (CPU and memory), to deploy new VNFs instances, and to offload VNFs to a central cloud depending on network conditions, VNFs’ requirements and the pool of available resources. We formulated the stochastic problem of resource allocation for a radio access network, where a group of BSs are connected to a CU that needs to provision and manage resources for the BS users as a Markov decision problem. Then, we proposed a DRL-based solution for this MANO problem, more precisely, we presented a novel approach named PAT, which leverages the actor-critic method to learn to provision network resources to the VNFs in an online manner, given the current network state and the requirements of the deployed VNFs. The novel architecture implements two critics for action value function estimation (twin), and two actor networks are used to determine the action and the parameter. A deterministic policy is implemented for both action and parameter selection. We have shown that the proposed solution outperforms all benchmark DRL schemes as well as heuristic greedy allocation in a variety of network scenarios, including static traffic arrivals as well as highly time-varying traffic settings. To the best of our knowledge, this is the first work that considers DRL for network MANO of VNFs. As future research directions, we consider addressing the MANO of VNF chains. The problem addressed in this work does not take into account the likely relation between different VNFs to form VNF chains, where NFs may have a temporal ordering in which they are requested by users. This factor highly increases the complexity of resource allocation as the overall user experience might be affected by a subtle VNF resource modification. Furthermore, another interesting direction might be the use of hierarchical DRL approach to be able to coordinate at the same time the network slice requirements with the sub-VNFs instantiated by those slices when deployed in a shared pool of resources. REFERENCES [1] C. Liang and F. R. Yu, “Wireless network virtualization: A survey, some research issues and challenges,” _IEEE_ _Communications_ _Surveys_ _&_ _Tutorials_, vol. 17, no. 1, pp. 358–380, 2015. [2] B. Han, V. Gopalakrishnan, L. Ji, and S. Lee, “Network function virtualization: Challenges and opportunities for innovations,” _IEEE_ _Communications_ _Magazine_, vol. 53, no. 2, pp. 90–97, 2015. [3] M. M. Murthy, H. Sanjay, and J. Anand, “Threshold based auto scaling of virtual machines in cloud environment,” in _IFIP_ _International_ _Conference_ _on_ _Network_ _and_ _Parallel_ _Computing_ . Springer, 2014, pp. 247–256. [4] J. M.-A. Tania Lorido-Botran and J. A. Lozano, “A review of auto-scaling techniques for elastic applications in cloud environments,” _Journal_ _of_ _grid_ _computing_, vol. 12, no. 4, pp. 559–592, 2014. [5] A. W. Services. (2016) Fleet management made easy with auto scaling. [Online]. Available: [https://aws.amazon.com/](https://aws.amazon.com/blogs/compute/fleet-management-made-easy-with-auto-scaling/) [blogs/compute/fleet-management-made-easy-with-auto-scaling/](https://aws.amazon.com/blogs/compute/fleet-management-made-easy-with-auto-scaling/) [6] M. Azure. (2018) Azure resource manager overview. [Online]. Available: [https://docs.microsoft.com/en-us/azure/](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview) [azure-resource-manager/resource-group-overview](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview) [7] S. Dutta,, S. Gera,, A. Verma, and B. Viswanathan, “Smartscale: Automatic application scaling in enterprise clouds,” in _Cloud_ _Computing_ _(CLOUD),_ _2012_ _IEEE_ _5th_ _International_ _Conference_ _on_ . IEEE, 2012, pp. 221–228. [8] L. Yazdanov and C. Fetzer, “Vscaler: Autonomic virtual machine scaling,” in _2013_ _IEEE_ _Sixth_ _International_ _Conference_ _on_ _Cloud_ _Computing_ . IEEE, 2013, pp. 212–219. [9] X. Chen, H. Zhang, C. Wu, S. Mao, Y. Ji, and M. Bennis, “Optimized computation offloading performance in virtual edge computing systems via deep reinforcement learning,” _arXiv_ _preprint_ _arXiv:1805.06146_, 2018. [10] P. Tang, F. Li, W. Zhou, W. Hu, and L. Yang, “Efficient auto-scaling approach in the telco cloud using self-learning algorithm,” in _Global_ _Communications_ _Conference_ _(GLOBECOM)_ . IEEE, 2015, pp. 1–6. [11] S. Rahman, T. Ahmed, M. Huynh, M. Tornatore, and B. Mukherjee, “Auto-scaling network resources using machine learning to improve qos and reduce cost,” _arXiv_ _preprint_ _arXiv:1808.02975_, 2018. [12] Z. Zhao, R. Li, Q. Sun, Y. Yang, X. Chen, M. Zhao, and H. Zhang, “Deep reinforcement learning for network slicing,” _arXiv_ _preprint_ _arXiv:1805.06591_, 2018. [13] R. Li, Z. Zhao, Q. Sun, I. Chih-Lin, C. Yang, X. Chen, M. Zhao, and H. Zhang, “Deep reinforcement learning for resource management in network slicing,” _IEEE_ _Access_, vol. 6, pp. 74 429–74 441, 2018. [14] X. Chen, Z. Zhao, C. Wu, M. Bennis, H. Liu, Y. Ji, and H. Zhang, “Multi-tenant cross-slice resource orchestration: A deep reinforcement learning approach,” _IEEE_ _Journal_ _on_ _Selected_ _Areas_ _in_ _Communications_, 2019. [15] C. Qi, Y. Hua, R. Li, Z. Zhao, and H. Zhang, “Deep reinforcement learning with discrete normalized advantage functions for resource management in network slicing,” _arXiv:1906.04594_, 2019. [16] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra, “Continuous control with deep reinforcement learning,” _arXiv_ _preprint_ _arXiv:1509.02971_, 2015. [17] S. Fujimoto, H. van Hoof, and D. Meger, “Addressing function approximation error in actor-critic methods,” _preprint_ _arXiv:1802.09477_, 2018. [18] M. Hausknecht and P. Stone, “Deep reinforcement learning in parameterized action space,” _International_ _Conference_ _on_ _Learning_ _Representations_ _(ICLR)_, 2016. [19] P. Sharma, L. Chaufournier, P. Shenoy, and Y. Tay, “Containers and virtual machines at scale: A comparative study,” in _Proceedings_ _of_ _the_ _17th_ _International_ _Middleware_ _Conference_ . ACM, 2016, p. 1. [20] Docker. (2018) What is a container. [Online]. Available: [https://www.docker.com/resources/what-container](https://www.docker.com/resources/what-container) [21] R. Morabito, “Power consumption of virtualization technologies: An empirical investigation,” in _Utility_ _and_ _Cloud_ _Computing_ _(UCC),_ _2015_ _IEEE/ACM_ _8th_ _International_ _Conference_ _on_ . IEEE, 2015, pp. 522–527. [22] S. F. Piraghaj, A. V. Dastjerdi, R. N. Calheiros, and R. Buyya, “A framework and algorithm for energy efficient container consolidation in cloud data centers,” in _Data_ _Science_ _and_ _Data_ _Intensive_ _Systems_ _(DSDIS),_ _2015_ _IEEE_ _International_ _Conference_ _on_ . IEEE, 2015, pp. 368–375. [23] R. D. Sumit Maheshwari, Saurabh Deochake and A. Grover, “Comparative study of virtual machines and containers for devops developers instructor: Prof. richard martin,” _arXiv_ _preprint_ _arXiv:1808.08192_, 2018. [24] R. Sutton,, and A. G. Barto, _Introduction_ _to_ _reinforcement_ _learning_ . MIT press Cambridge, 1998, vol. 135. [25] D. M. Gutierrez-Estevez, M. Gramaglia, A. de Domenico, N. di Pietro, S. Khatibi, K. Shah, D. Tsolkas, P. Arnold, and P. Serrano, “The path towards resource elasticity for 5g network architecture,” in _Wireless Communications and Networking_ _Conference_ _Workshops_ _(WCNCW),_ _2018_ _IEEE_ . IEEE, 2018, pp. 214–219. [26] K. Narasimhan, T. D. Kulkarni, and R. Barzilay, “Language understanding for textbased games using deep reinforcement learning,” in _In_ _Proceedings_ _of_ _the_ _Conference_ _on_ _Empirical_ _Methods_ _in_ _Natural_ _Language_ _Processing_ . Citeseer, 2015. [27] C. Zhang, P. Patras, and H. Haddadi, “Deep learning in mobile and wireless networking: A survey,” _arXiv_ _preprint_ _arXiv:1803.04311_, 2018. [28] V. Mnih, K. Kavukcuoglu, D. Silver, A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. Fidjeland, G. Ostrovski _et_ _al._, “Human-level control through deep reinforcement learning,” _Nature_, vol. 518, no. 7540, p. 529, 2015. [29] Z. Wang, T. Schaul, M. Hessel, H. V. Hasselt, M. Lanctot, and N. D. Freitas, “Dueling network architectures for deep reinforcement learning,” _arXiv_ _preprint_ _arXiv:1511.06581_, 2015. [30] D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. Riedmiller, “Deterministic policy gradient algorithms,” in _ICML_, 2014. [31] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks,” in _Proceedings_ _of_ _the_ _thirteenth_ _international_ _conference_ _on_ _artificial_ _intelligence_ _and_ _statistics_, 2010, pp. 249–256. [32] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu, “Asynchronous methods for deep reinforcement learning,” in _International_ _conference_ _on_ _machine_ _learning_, 2016, pp. 1928–1937. [33] “Architecture and mechanisms for resource elasticity provisioning,” _EU_ _H2020_ _project_ _5G-MoNArch,_ _Deliverable_ _D4.1_, 2018. <u>Algorithm</u> <u>1</u> <u>Proposed</u> <u>PAT</u> Initialize the actors and critics networks, i.e., _θ_ 1 _, θ_ 2 and _φ_ 1 _, φ_ 2 using Gaussian initialization with _µ_ = 0 _, σ_ = 10 <sup>_−_</sup> <sup>2</sup> _._ Copy the parameters to the target networks, i.e., _φ_ <sup>_−_</sup> 1 <sup>_←_</sup> <sup>_φ_</sup> <sup>1</sup> <sup>_, φ−_</sup> 2 <sup>_←_</sup> <sup>_φ_</sup> <sup>2</sup> <sup>_, θ_</sup> 1 <sup>_−_</sup> <sup>_←_</sup> <sup>_θ_</sup> <sup>1</sup> <sup>_, θ_</sup> 2 <sup>_−_</sup> <sup>_←_</sup> <sup>_θ_</sup> <sup>2</sup> Initialize the replay buffer _M_ _t_ = 0 while _t < total_ _<u>timesteps</u>_ do for i= 0,...,T do Observe state _s_ . Select action _a_ = _µθ_ 2 ( _s_ ) with probability 1 _−_ _ϵ_ or a random action _a_ with probability _ϵ_ . Select parameter _p_ - _,_ _p_ = clip - _µθ_ 2 ( _s, a_ ) + _w, pmin, pmax_ �0 _, σ_ <sup>2�</sup> _·_ ( _pmax, ηmax_ ) _, −c, c_ where _w_ _∼_ clip - _N_ Store transaction _⟨s,_ ( _a, p_ ) _, r, s_ <sup>_′_</sup> _⟩∈M_ end for Get a batch _B_ = _{_ ( _s,_ ( _a, p_ ) _, r, s_ <sup>_′_</sup> ) _}_ of randomly sampled trajectories from the replay buffer _M_ Compute the action and parameter targets: _a_ <sup>_−_</sup> ( _s_ <sup>_′_</sup> ) = _µθ_ 1 _−_ <sup>(</sup> <sup>_s_</sup> <sup>)</sup> _p_ <sup>_−_</sup> ( _s_ <sup>_′_</sup> _, a_ <sup>_−_</sup> ) = clip - _µθ_ 2 - _s_ <sup>_′_</sup> _, a_ <sup>_−_</sup> ( _s_ <sup>_′_</sup> ) - + _w, pmin, pmax_ Compute the targets estimates _Qφ−i_ _Qφ−_ _, p_ <sup>_−_</sup> <sup>�</sup> _s_ <sup>_′_</sup> _, a_ <sup>_−_</sup> ( _s_ <sup>_′_</sup> ) _s_ <sup>_′_</sup> _, a_ <sup>_−_</sup> ( _s_ <sup>_′_</sup> ) �� <sup>�</sup> _y_ ( _r, s_ <sup>_′_</sup> ) = _r_ + _γ_ min _i_ =1 _,_ 2 Update the Q-Functions accordingly: - _s_ <sup>_′_</sup> _, a_ <sup>_−_</sup> <sup>�</sup> _s_ <sup>_′_</sup> <sup>�</sup> _ρ∈B_ _∇θ_ 1 1 _|B|_ ( _s,p_ ) _∈B_ _Qφ_ 1 - _r, s_ <sup>_′_</sup> <sup>��2</sup> for _i_ = 1 _,_ 2 _∇φi_ 1 _|B|_ - _Qφi_ ( _s, a, p_ ) _−_ _y_ Update the action policy: Update the parameter policy: Update the target networks: _t_ = _t_ + 1 end while - _s, µθ_ 1 ( _s_ ) _, p_ ( _s,a_ ) _∈B_ _∇θ_ 2 1 _|B|_ _Qφ_ 1 - _s, a, µθ_ 2 ( _s, a_ )� _φ_ <sup>_−_</sup> _i_ <sup>_−_</sup> _i_ <sup>=</sup> <sup>_τφi_</sup> <sup>+ (1</sup> <sup>_−_</sup> <sup>_τ_</sup> <sup>)</sup> <sup>_φ_</sup> _i_ <sup>_−_</sup> _i_ <sup>_−_</sup> for _i_ = 1 _,_ 2 _θ_ <sup>_−_</sup> = _τθi_ + (1 _−_ _τ_ ) _θi_ <sup>_−_</sup> for _i_ = 1 _,_ 2

섹션 본문 133문단 · 50,100자

(제목 없음)

1Management and orchestration (MANO) of resources by virtual network functions (VNFs) represents one of the key challenges towards a fully virtualized network architecture as envisaged by 5G standards. Current threshold-based policies inefficiently over-provision network resources and underutilize available hardware, incurring high cost for network operators, and consequently, the users. In this work, we present a MANO algorithm for VNFs allowing a central unit (CU) to learn to autonomously re-configure resources (processing power and storage), deploy new VNF instances, or offload them to the cloud, depending on the network conditions, available pool of resources, and the VNF requirements, with the goal of minimizing a cost function that takes into account the economical cost as well as latency and the quality-of-service (QoS) experienced by the users. First, we formulate the stochastic resource optimization problem as a parameterized action Markov decision process (PAMDP). Then, we propose a solution based on deep reinforcement learning (DRL). More precisely, we present a novel RL approach called, parameterized action twin (PAT) deterministic policy gradient, which leverages an actor-critic architecture to learn to provision resources to the VNFs in an online manner. Finally, we present numerical performance results, and map them to 5G key performance indicators (KPIs). To the best of our knowledge, this is the first work that considers DRL for MANO of VNFs' physical resources.

I. INTRODUCTION

2Traditionally the deployment of new network functions (NFs) has been done through the acquisition and installation of a proprietary hardware running a licensed software. This fact arXiv:1910.10695v1 [cs.IT] 23 Oct 2019 reduces the incentives for network operators in updating their network's physical architecture to offer new services or update existing ones, as it represents an increase in both the capital expenditures (CAPEX), i.e., equipment inversion, equipment installation and personnel training, and operational expenditures (OPEX), i.e., the cost of of operating the system [1]. To overcome this limitation, network function virtualization (NFV) has been proposed to curtail constant acquisition of technical hardware, by leveraging virtualization technology to implement NFs using general purpose computers/servers [2]. With virtualization, software implementation of a NF can be decoupled from the underlying hardware, i.e., NFs can be instantiated without the need of new equipment acquisition and installation, and they can run over commercial offthe-shelf hardware. The isolation of software from hardware allows for a set of VNFs to be deployed on a shared pool of resources. This motivates a solution to manage the underlying shared infrastructure (processing power, storage, etc.) in an efficient, scalable and rapid manner.

3There has been a lot of work on resource allocation for cloud networks. One of the most popular ways to address resource provisioning is threshold-based reactive approaches, where resources are added or removed if the network's condition reaches certain predefined thresholds [3]- [6]. Although this provides a simple and scalable solution to dynamic resource allocation, threshold-based criteria tend to over-provision and under-utilize network equipment (incurring high costs for the infrastructure provider) and make the management of dynamic traffic and deployment of new types of services difficult as network traffic models must be elaborated beforehand. In [7], authors study the scaling of virtual machines (VMs) in a proactive way. In particular they propose a solution via decision tree approach to resolve whether a VM instance should be vertically scaled; that is, more physical resources (e.g., processing power, storage) should be added, or horizontally scaled, i.e., by deploying a new VM instance. An autonomous vertical scaling approach is proposed in [8] using Q-learning, where an agent learns how to autonomously provision resources (storage and processing power) to a VM.

4With the explosion of machine learning (ML) and virtualization technologies, and their applications to communication networks, the idea of self-governing networks leveraging modern ML techniques is becoming popular among the communications research community. Chen et.

5al. [9] proposes deep double Q-learning (DDQ) and deep-SARSA solutions for mobile edge computing, where an end user terminal with limited local computation and energy resources jointly optimizes computation offloading and energy consumption selection in an autonomous manner. The end user terminal decides whether to execute a computing task locally or offload it to one or more of the available edge base stations (BSs), also selecting the amount of energy to be allocated for the task in question. A proactive VM orchestration solution is proposed in [10] using Q-learning, where, given the current state, an agent decides to increase, reduce or retain the number of VMs allocated to a VNF. In [11], a deep learning approach is introduced to decide the number of VNFs that must be deployed to meet the network traffic demands. The authors formulate a classification problem, where each class corresponds to the number of VNFs that must be instantiated to be able to cope with the current traffic, and use historical labelled traffic data to train the proposed algorithm.

6More recently, in the management and network orchestration (MANO) domain for wireless networks resources, the use of DRL has gained attraction for network slicing resource orchestration and management. These works formulate a discrete action selection optimization problem, and use well established value-based methods, e.g., Q-learning or SARSA, to solve the formulated problem. In this line lies the work of [12], which proposes a deep Q-learning approach to radio resource slicing and priority-based core network slicing, showing its advantage in addressing demand-aware resource allocation. In [13], authors formulate the problem of frequency bands allocation, and the problem of computation resources orchestration for different slices. These problems are reduced to choosing a particular configuration from a finite set of available configurations, which is done leveraging DDQNs. Similarly, in [14], a DRL solution based on DDQN is presented for multi-tenant cross-slice resource orchestration, where again, a discrete number of communication and computation resources have to be allocated to different slice tenants. Finally a deep deterministic policy gradient (DDPG) with advantage function is employed in [15] to allocate bandwidth resources to different network slices. Compared to the aforementioned approaches, the continuous nature of DDPG allows for more fine-grained resource allocation.

7In our work, we consider 3GPP functional split, where a central unit (CU) deploys and maintains a set of VNFs serving the users of several distributed units (DUs). We first formulate the dynamic allocation of processing and storage resources to VNFs as a Markov decision process (MDP). The optimal solution for this problem is elusive due to prohibitively large state and action spaces. Therefore, we present a novel deep reinforcement learning (DRL) algorithm, called parameterized action twin (PAT), where we use DDPG [16] and its novel variant called twin delayed DDPG [17], as well as ideas from the parameterized action Markov decision process (PAMDP) as in [17], [18], so that an agent placed at the CU is trained to learn whether to scale vertically (add processing power and storage), horizontally (instantiate new VNFs), or to offload (send the VNFs to the cloud) based on the system state (service request arrivals, service rates, service level agreement (SLA), etc.), using a cost function that combines the economic cost, SLA requirements, and the latency experienced by the users. The proposed algorithm is deployed in a variety of scenarios and its performance is evaluated according to a defined set of 5G key performance indicators (KPIs).

8The feasibility of the proposed solution relies on the assumption that the technology envisaged for NF virtualization is "containerization" [19], where containers perform operating-system-level virtualization, i.e., every time a VNF is launched a container is deployed in a physical server. A "container" is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings and its run by the operating system kernel [20]. Containers are isolated from one another and can communicate with each other through well-defined channels. We find containers to be a more appropriate virtualization technology, compared to others, such as VMs, as they require less power [21], take less start-up and re-scaling time [22], [23], and, most importantly, can be rescaled on-the-fly without disrupting the service they provide.

9Due to the use of an actor-critic architecture, our approach is a joint policy and actionvalue-based optimization, which generally shows better convergence properties [16] compared to value-based approaches implemented in [9], [10], [12]- [14]. Moreover, Q-learning and SARSA are used for discrete action selection [24], which is not feasible for the continuous control problem addressed in this work. Although a continuous action space is considered in [15], it focuses on the allocation of a single resource (bandwidth), while we consider the allocation of two continuous resources plus a discrete action for server selection. In contrast to [10], we consider not only horizontal scaling but also vertical scaling, as well as offloading, significantly increasing the complexity of the problem. Furthermore, our algorithm works in an online manner, i.e., dynamically adapting to the network traffic, which differs from [11], where the algorithms are trained using historic labelled data and cannot adapt to new types (i.e., classes) of traffic that differs significantly from the training set. Moreover, in disagreement with what is stated in [11] for reinforcement learning (RL) approaches, our approach can use unlabelled historical data to learn, as we are interested in the network patterns (captured by the historical arrival and service times) to update the critic value-function estimates accordingly. Finally, in comparison with the cloud management algorithm presented in [7], using deep neural networks (DNNs) for function approximation can handle a higher dimensional state space, which would be challenging to be captured using decisions trees due to the exponential growth in the number of leaves.

10The remainder of this paper is organized as follows: In Section II the system model is introduced. The problem formulation using a Markov decision process (MDP) framework is presented in Section III. In Section IV we provide an overview of the RL notation, and review the works upon which our approach is based. The proposed PAT algorithm used to train the agent is explained in Section V. Numerical results illustrating the performance of the PAT algorithm are presented in Section VI. Finally a summary of the results and conclusions is presented in Section VII. We envisage an autonomous CU that has a local pool of resources that can be used to instantiate new VNFs, or to maintain deployed ones. The pool of local resources consists of K servers denoted by {S 1 , . . . , S K }, each with a limited processing and storage capability. We assume homogeneity across servers, such that each S k , k ∈ [K], has the same storage size of η max F bits and a central processing unit (CPU) of capability ρ max C Hz. In addition to the local servers, the CU can also employ resources located at a cloud center by offloading VNFs to the cloud, albeit at an increased cost which will be specified later. We consider a central cloud with an infinite capacity resource pool, and denote it by S K+1 , so the set of available resources to the CU is denoted by K = {S 1 , . . . , S K+1 }. We consider a slotted resource allocation scheme, where new users arriving at the system wait until the start of the next slot to be allocated resources. Thus, the time horizon is discretized into decision epochs, corresponding to slots of duration T , and are indexed by an integer t ∈ N + .

11At the beginning of each decision epoch, the CU decides how to allocate the network resources so that the VNFs can operate in the most agile and efficient way. We denote by N (t) ⊂ N , the set of active VNFs maintained by the CU during epoch t. The dependency on t of N (t) emphasizes the fact that VNFs can be added or removed from the set of services provided by any BS overtime. Let us refer to ρ (t) k ≤ ρ max and η (t) k ≤ η max as the total processing power and storage, respectively, of server S k being used at epoch t. The CU is connected to the cloud via a dedicated link of capacity R (t) Mbps. We denote by N k,j the instance of N j deployed at server S k , and allow only for one instance of each VNF to be deployed in a server.

12We consider two main physical resources to be provisioned to the VNFs, CPU and memory, and assume that NF instance N k,j , ∀j ∈ [N ], at epoch t uses c

13k,j . Thus, each VNF has a different resource range in which it can operate following the definition of an elastic NF, which refers to a VNF whose QoS gracefully degrades with the scarcity of resources [25]. The range of CPU and memory resources VNF N k,j is able to operate at is given

14where u (t) k,j denotes the number of users being served by VNF instance N k,j at epoch t; c j,0 and m j,0 represent the offset CPU and memory requirements, respectively, that do not depend on the number of users being served. The variables c j,r and m j,r account for the linear increment of CPU and memory per user being served by the particular deployment of N j in server S k .

15Values ∆c j,d and ∆m j,d are referred as the elastic service coefficients, and define the resource range under which the VNF is able to operate.

16The QoS of the u (t) k,j users served by the instance of VNF N k,j is denoted by QoS We assume that QoS k,j is given by the following piecewise function:

17where we defined r

18k,j . We see that N k,j satisfies the SLA if and only if m

19k,j as these result in QoS

20The number of new service requests from all the BSs for VNF N j , j ∈ [N ], in epoch t,

21is denoted by n (t) j , and is assumed to follow an independent and identically distributed (i.i.d.) homogeneous Poisson process with parameter λ (t) j ; in other words, the probability of n (t) j new demands to arrive at the CU for VNF N j in epoch t for a time-slot of duration T is given by:

22Remark 1. In order to capture slow variations of network traffic over time, we consider timevarying λ (t) j values, obtained by sampling a Gaussian distribution with parameters µ j and σ j and taking the maximum between the obtained value and 0, i.e., λ

23We assume value of λ j is kept constant for a block of t max time slots, and changes to an independent realization from the aforementioned truncated Gaussian distribution for the next block.

24Remark 2. The value of R (t) is also obtained by sampling a truncated Gaussian distribution. Its values is given by

25We model users' service times by a geometric distribution; i.e., at the end of each time slot a user will remain in the system with probability p j , and will leave the system with probability 1 − p j , so the expected service time of a user is 1/p j , ∀j ∈ [N ].

26There are three objectives the CU may want to optimize simultaneously: latency, financial cost and service quality. In order to simplify this multi-objective optimization problem we let the CU to minimize the long-term cost formed as a weighted combination of these three objectives. Next we explain each of these costs.

27The latency cost associated with VNF instance N k,j during epoch t is due to three potential causes of latency:

28r k,j : This latency is associated with resizing the containers. Resizing a VNF consists of varying the amount of allocated CPU and memory resources.

29Docker allows to resize containers on-the-fly by using the command docker update (from Docker v1.11.1). We consider that any instantiated container incurs a delay of δ r,c per unit C of CPU added/removed, and δ r,m per block of memory of size F added/removed. Thus, the VNF instance N k,j resizing latency is given by:

30• Deployment latency δ (t) d k,j : When a new VNF N k,j is instantiated on a server S k , k ∈ [K], we consider a boot-up delay of δ d,b per container. The total deployment latency of instance N k,j is given by

31• Offloading latency δ of f K+1,j : If a VNF instance is decided to be deployed on the cloud, in order to keep the service running, a continuous flow of information between the cloud and the CU is retained until the VNF is terminated. This communication incurs a total latency

32for the offloaded VNF. Once a VNF is deployed in the cloud, we consider that the maximum resource utilization is guaranteed r

33K+1,j = QoS max . The total latency incurred by VNF instance N k,j at epoch t is given by:

34All the users, being served by instance N k,j experience the same latency, and hence the scaling by u (t) k,j , the number of users being served for each instance.

35T k,j ) : A price model that takes into account the economic implications of each N k,j VNF instance configuration is developed.

36r k,j : We consider a financial cost of C r,m per B bits of memory per epoch and C r,p per C units of CPU resource per epoch for server S k , k ∈ [K], i.e.,

37, is powered on, we consider a one-time payment of C i,0 plus a rental cost of C i,v per epoch. Hence the server cost is given by:

38The financial cost of offloading a VNF to the cloud is modelled as a one-time payment of C c,0 plus a rental payment of C c,v per user per epoch until the VNF is terminated. Thus the cloud cost of VNF N j is given by:

39The total financial cost of VNF instance N k,j at epoch t is given by:

40, is associated with a minimum QoS requirement, QoS min j , and the failure to provision resources accordingly might incur service disruption, which violates the SLA. Accordingly, we define the SLA cost at

41where QoS

42k,j is the perceived QoS of VNF N j at server S k , and γ j is the penalty for not fulfilling QoS j . Furthermore, the SLA cost scales with the number of users being served by the VNF instance N k,j as all of them experience the same QoS. As it is going to be detailed later, our models tries to minimize a cost function; and thus, we would like to reinforce the good actions that lead to higher QoS by reducing the cost or by even making it negative. To this end, we define the SLA cost to be inversely proportional to the perceived QoS. Furthermore, the whole of users served by the VNF instance experience the same SLA cost, that is why, this cost is again scaled by the number of users u (t) k,j . We remark that, in order to capture the impact of reconfiguration of a VNF container on the whole network, each objective cost function is scaled by the number of users, such that a reconfiguration that affects more users is penalized/rewarded more than those affecting less users.

43Network Cost: We define the overall network cost as the total cost incurred by all the instances deployed in the network at decision epoch t, defined as:

44where the weights ω 1 , ω 2 , ω 3 ∈ R + are fixed weights independent of the VNF and the server.

45These weights can be tuned based on the preferences of the network operator, e.g., a network operator might be more concerned about reducing the economic cost rather than providing a high quality service, etc. The normalization by the number of users is to balance the network cost between heavy and low traffic periods. Without such a normalization busy traffic periods would incur higher costs regardless of the CU's performance.

46VNF Instance Cost: For purposes that will be explained in Section IV, we define the VNF instance cost C (t) k,j incurred by instance N k,j at epoch t, as follows:

47This cost measures the contribution of a particular VNF instance to the global network cost.

III. PROBLEM FORMULATION

48In this section, we formulate the resource allocation problem as a MDP. We envisage an autonomous CU with the goal of minimizing the long-term cost. To this end, we define the state space and the set of actions that the CU can take at each decision epoch.

A. MDP

49At each decision epoch of a MDP an agent observes a state s (t) ∈ S, where S is the state space, and selects and action a (t) ∈ A s (t) , where A s (t) is the set of all possible actions in state s (t) .

50is referred as the action space. Action a (t) in state s (t) incurs a certain cost R s (t) , a (t) , where R : S × A → R denotes the cost function, and the agent transitions to a new state s (t+1) ∈ S with probability p s (t+1) | s (t) , a (t) ∈ P, where P : S × A × S → [0, 1] is a probability kernel. At each interaction, the agent maps the observed state s (t) to a probability distribution over the action set A s (t) . This MDP model is thus characterized by the 4-tuple s, a, r, p (s | s, a) . This mapping specifies the policy of the agent, and is denoted by π. The probability of selecting action a (t) = a in state s (t) = s is given by π (a | s).

51The state-value function V π (s) for policy π at state s is defined as the expected discounted cost the agent would accumulate starting at state s following policy π:

52where 0 ≤ γ ≤ 1 is the discount factor that determines how far into the future the CU "looks",

53i.e., γ = 0 corresponds to a "myopic" CU, that focus only on its immediate cost, while γ = 1

54represents an CU concerned with the cost over the whole time horizon. The action-value function, also referred as Q-function, is defined as:

55We define the optimal value function, V * (s), as the minimum expected total discounted cost obtained starting in state s and following the optimal policy:

56The goal is to find a policy π * whose value function is the same as the optimal value function V π * (s) = V * .

57Next, we define the state and action spaces for our problem.

B. State Space

58The 3) number of users being served by VNF N j at each server, u (t) k,j . 4) cloud link capacity, R (t) . 5) CPU resources allocated to each VNF at each server, C (t) . 6) memory resources allocated to each VNF at each server, S (t) .

59The network state at epoch t is characterized by

C. Action Space

60We consider three distinct ways the CU can react to variations in the workload: vertical scaling, horizontal scaling and offloading. The CU actions are taken at the user level, that is, the CU selects an action for each user request arriving at the system. This allows the CU to allocate users requesting the same VNF to different servers.

61Following [26], we employ a PAMDP formulation, where a discrete action set is defined as 1 , a 2 , . . . , a D }, and each action a ∈ A D is associated with n a continuous parameters p a 1 , . . . , p a na , p a i ∈ R. Thus, each tuple a, p a 1 , . . . , p a na represents a distinct action, and the action space is given by A = ∪ a∈A D a, p a 1 , . . . , p a na . In our problem, the first discrete component denotes the server at which the user is assigned to, while the remaining continuous components denote how the associated resources are updated.

62Vertical Scaling: The vertical scaling action space, denoted by A V = [K], refers to actions adding resources to, or removing from, a deployed VNF container instance at epoch t [7].

63Taking into account the traffic fluctuations and VNF requirements, a CU might decide to increase (decrease) the CPU, and/or memory resources allocated to a deployed VNF instance independently, i.e., the memory allocation can be increased while the CPU allocation is decreased, or vice-versa. Hence, we define the vertical scaling actions separately for the CPU and memory resources, as p

64Vertical scaling is limited by the resources of the physical server in which a container is deployed, thus, the limitation of ρ max − ρ M can also take negative values. As mentioned before, all the users of a server's VNF instance equally share the allocated resources, thus, all of them are affected by the reshuffling of resources.

65Horizontal Scaling: Horizontal scaling refers to the deployment of new containers to support an existing VNF N j at epoch t. If the load of a VNF increases, and the CU estimates that server k at epoch t + 1 will not be able to support its operation the CU might create another instance of the same VNF in another server.

66where k denotes the server at which a new VNF instance is to be deployed using horizontal scaling. p M account for the amount of CPU and memory resources to be allocated for the new deployment of N k,j at server k.

67Work offloading: If the CU foresees that it cannot cope with a traffic fluctuation by scaling vertically or horizontally, it can decide to offload a VNF to the cloud. We define the offloading action as A (t) of f . This action is not associated with any parameter due to the assumption of unlimited CPU and memory resources at the cloud.

68Parametrized Action Space: Following the PAMDP notation the complete parameterized action space at epoch t is given by

69so that the CU action taken at epoch t, a (t) ∈ A (t) .

70The cost function for our problem has been defined in Section II in detail. Note that the CU's action at each time slot consists of n j (t) actions in the PAMDP formulation, one for each user request. Note that the randomness in our problem is due to random users arrivals for each VNF, and the random service time for each user in the system. If these statistics are known, the optimal policy can be identified through dynamic programming (DP), e.g., by the value iteration algorithm. However, estimating these probabilities for our problem, which has large state and action spaces is prohibitive, making the DP solution practically infeasible. Hence, we will instead exploit DRL to find an approximation to the optimal value function.

IV. REINFORCEMENT LEARNING FOR VNF MANAGEMENT

71In the RL method used in this work, the agent does not necessarily exploit (or even know) the transition probabilities governing the underlying MDP as it learns directly a policy as well as the action-value functions based on its past experience (model-free). The formulated problem suffers from the curse of dimensionality due to the prohibitively large size of the state and action spaces (continuous state space). Therefore, we employ the actor-critic method with NNs as a function approximation to parametrize the policy, and allows the learning agent to directly search over the action space. Another DNN is employed to approximate the state-value functions, which are used as feedback to determine how good the current policy is.

A. Deep Reinforcement Learning (DRL)

72The use of DNNs as general function approximators have been proven to work very well in a wide range of areas, such as computer vision, speech recognition, natural language processing and recently wireless networks [27]. Traditional RL methods struggle to address real-world problems due to their high complexity. In these problems, high-dimensional state spaces need to be managed in order to obtain a model that can generalize past experiences to new states. such as Duelling DQN [29], where there are two distinct DNNs, one to estimate V π (s) and the other to estimate the so-called advantage function A π (s, a) = Q π (s, a) − V π (s). These methods work well for a continuous state space but are limited to discrete action space, suffering from the curse of dimensionality when the action space is large.

73To overcome the limitation of discrete action selection, in [16] the idea of DQN is extended to continuous action spaces using the deterministic policy gradient (DPG) theorem [30], in particular the deep-DPG (DDPG) method. DDPG extends the use of DNN to the actor-critic method leveraging off-policy learning, where a deterministic policy is learned using a combination of replay buffer and target networks to ensure stability and a zero-mean Gaussian noise is added to the actions for action space exploration.

74In [17] it is shown that DDPG may lead to overestimated action-value estimates, thereby to suboptimal policies. To overcome this problem, authors present a novel method called twin delayed DDPG (TD3). A novel actor-critic architecture is proposed which comprises two critic networks, hence, two different Q-functions are learned, and the smaller of the two estimates is used as the update rule for the critics. The proposed algorithm adds clipped noise to the target action to make it harder for the policy to exploit Q-function errors. They also propose to update the targets and the policy less frequently than the Q-functions, helping to reduce the variance.

75Given the high dimensionality of both the state and the action spaces in our model we propose a solution that leverages DNNs as policy and action-value function approximators, while exploiting the results from [17] for continuous action selection. To this end, we implement a novel architecture for PAMDP to address the problem defined in Section III.

V. ACTOR-CRITIC METHOD IN PAMDP

76In the proposed approach, the actor-critic method is leveraged, which is a combination of value based and policy optimization approaches. It combines the benefits of both methods as the critic estimates the action-value function Q φ (s, a), while the actor derives a policy π θ (s) critically using the value estimates of the critic to update the policy. In this section we present our novel approach that implements the actor-critic method for a PAMDP, which we call the parameterized action twin (PAT). The proposed PAT algorithm is presented in Algorithm 1. For ease of notation in the rest of the section we will refer to s (t) = s, s (t+1) = s , a (t) = a, R s (t) , a (t) = r.

A. VNF MANO meets PAT

77Before detailing the proposed RL algorithm, we clarify its integration into the CU, and how it interacts with the environment described in Section II, as we believe it will ease the comprehension of the algorithm.

78At the beginning of each decision epoch t, we randomly select a VNF and we proceed to serve its new arrived users. The random selection of VNF is motivated by fairness, so that we avoid starting the process of resource allocation (when more resources are available) with always the same VNFs. Following the random VNF selection, we iterate over all requests of this VNF to allocate the network resources using the PAT method. For resource allocation, a snapshot of the network state is used as input to the PAT method. Based on the network state, the proposed RL algorithm decides the actions to be taken and from which server/cloud the user is served.

79After the allocation, a new updated snapshot of the network state is obtained and the agent cost described in Section V-C is computed. These transitions are stored in the memory buffer of the agent and will later be used to train the PAT algorithm, so that it adapts to previously seen as

B. Parameterized Action Twin (PAT) algorithm

80Following [17], we use two critics in order to obtain two distinct estimates of the actionvalues; thus, two different DNNs, parameterized by φ 1 and φ 2 , are used to estimate two different action-value functions. The aim of the two critic networks, as explained in [17], is to avoid overestimation. We find that clipping the critics' updates to the minimum between the two estimates yields better policies. Note that this update rule might introduce underestimation bias;

81however, we find it more convenient in the long term to avoid convergence to suboptimal policies.

82Two more DNNs, parameterized by θ 1 and θ 2 , are used for the policy parameterization of the actor. The goal of the first actor network is to select the discrete action a based on the current state s, while the second network generates the continuous action parameters p = [p

83M ] T based on the outcome of the first actor network a and the current system state s. Thus, the joint selection (a, p) determined by two distinct networks, in contrast to the approach in [18], where a single DNN architecture is used to determine both, the action and the parameters associated with it. We find this architecture to reflect a more natural process of action selection by first deciding the discrete action a, and then, choosing the associated parameters p as defined in Subsection III-C. We use a stochastic policy for discrete action selection while deterministic policy is leveraged for parameter selection, which we denote by µ, i.e., parameters θ 2 map state and action (s, a) to parameters µ θ 2 (s, a) = p. Figure 2 illustrates the DNNs structure and the flow of information.

84Finally, four more DNNs are employed, corresponding to the mirroring target networks, and

85respectively. Their function is explained later in this section. 1) Parameter Updates: The critics take the network state s and the action (a, p), and estimate the value function Q φ i (s, a, p) , i = 1, 2. As is typical in actor-critic methods, we use off-policy temporal difference of 0, i.e., TD(0), for action-value function approximation, with clipped update rules as below:

86which minimizes the following loss function, for i = 1, 2:

87The action-value functions of the critics are learned through gradient descent with the update rule:

88The critics estimations of the joint action and parameters are gathered by the actors to update the policy. In continuous action space, the greedy update of the policy becomes infeasible as it requires a global maximization at every step, and going through all the action space to maximize the estimated expected return is infeasible. Following [30], we use the critics' network's gradient that indicates the direction the global Q-value estimate increases, to update the policy parameters.

89In order to obtain the gradients, we need to perform back-propagation through one of the critics network (we chose critic 1). It must be noted here that this gradient is not the conventional gradient over the network parametrization but with respect to the input, such that for the action network θ 1 the update rule is θ t+1

90while the update rule for network θ 2 is

91where s ∼ ρ θ i refers to the trajectory sample using network i.

922) Stabilizing updates: Once both the critic and the actor networks are updated, the target networks should also be updated. Target networks are used to stabilize the updates. If the same φ 1 = φ 2 = φ network is used for bootstrapping ( i.e., estimating the value function of the next state Q(s , a )) and estimating Q(s, a) in (20), the φ network will be updated with each iteration to move closer to the target Q-values; but, at the same time, the target Q-values, which are given by the same network, will also be changing in the same direction, like a dog chasing its tail.

93By introducing the target networks, we reduce this constant movement of the target estimates by delaying its update. The rule to update the target networks is given by

94where τ ≤ 1 is an hyper-parameter used to regulate the speed at which the target networks are updated.

95Another tool to stabilize the network parameter updates is the memory buffer M. The memory buffer stores the interactions of the agent with the environment, to be more precise, we store on-step trajectories, i.e., s, a, r, s . Once the memory is filled with enough samples (≈ 100K),

96we uniformly sample the memory to obtain mini-batches of size N = samples which are used to compute the losses of the actor and critic. The idea behind the use of a memory buffer is that, most optimization algorithms, including gradient descent, assume that the samples, from which the gradient estimate is obtained, are i.i.d. Clearly this is not the case in the defined environment;

97however, by sampling uniformly from the memory buffer the correlation between consecutive samples is reduced, leading to a more stable optimization of the action-parameter selection.

983) Exploitation vs. exploration: Any RL algorithm using deterministic policy entails the tradeoff between exploitation and exploration. For discrete action selection, we use the − greedy policy to ensure exploration, where with probability a random action is selected by sampling a uniform random distribution over all possible discrete actions. A high value for is set at the beginning to encourage exploration, but its value is reduced gradually over time until it reaches a certain minimum min , where it remains stable.

99Ensuring the exploration of all possible continuous parameters is not possible. We use the approach proposed in [17], where a clipped zero-mean Gaussian noise is constantly added to the parameter selection policy (see Eqn. (26)). This approach is motivated by the assumption that similar parameters should have similar costs and thus, similar estimates; and the noise addition is used to encourage exploration. After the addition of noise the parameter values are clipped to the allowed range [p min , p max ], as defined in Section III-C.

100µ (s, a) = clip (µ θ 2 (s, a) + w, p min , p max ) ,

101where σ and c are hyperparameters. Similarly to the parameter for the action selection, we gradually reduce the value of c, until it reaches a minimum value c min .

4) Architecture:

102The DNN architectures for the action, action parameter, and critic networks are the same. For all the networks, the inputs are processed by three fully connected layers consisting of 128-64 units respectively. Each fully connected layer is followed by a rectified linear unit (ReLU) activation function with negative slope 10 −2 . The weights of the fully connected layers are initialized using Xavier [31] initialization with a standard deviation of 10 −2 .

103The input of the actor action network is the network state, and connected to its final inner product layer there are K + 1 linear outputs corresponding to the discrete action selection (K servers plus the cloud). For the actor parameter network, the last layer comprises an hyperbolic tangent activation function scaled by p max and η max with two outputs, corresponding to the CPU and memory values allocated to the discrete action selected, while its inputs are the state and the selected action. Finally the critic network gathers the state, action, and the action parameters, and a single output value is obtained, the estimate of Q(s, a, p). We use ADAM optimizer for both the actor and the critic, with a learning rate of l r .

C. Agent Cost Function

104In Section II, and more precisely in Eqn. (13), we defined the global network cost as the main metric this work aims to minimize. However, we do not directly use (13) as the metric the agent optimizes, as we found it to be too general to guide the agent in its initial learning steps towards finding resource allocation policies that lead to good results. The goal of this subsection is to define the cost function Ψ (t) that we use to provide feedback to the agent regarding its actions.

105Individual actions taken by the agent have direct impact in the VNF performance of the selected instance and then a lighter contribution on the total network performance. Thus, in order to guide the agent to learn to allocate resources to different VNF instances, we use the VNF instance cost of (14). However, the minimization goal of this work is the total network cost, hence, we need to include it in the global picture. To this end we define the cost as follows:

106where Γ max is a hyperparameter that guarantees Ψ (t) ∈ [−1, 1], while β determines how much the agent accounts for the total network cost. Eqn. (27) is what we use in the DNN training, while Eqn. (13) is the objective function which is the aim of this work.

107Furthermore, during the training phase, the proposed RL approach needs to learn the physics of the environment, that is, at the beginning of the learning process the agent might try to add/subtract more CPU or memory to a server than the one that is available/possible. In order to teach the agent the environment's physical limitations, whenever the algorithm outputs an infeasible action we offload the user to the cloud, and impose a cost of Ψ (t) = −1.

VI. NUMERICAL RESULTS

108In this section we present numerical results obtained with the PAT method described in Section V. We start by presenting the DRL benchmarks to test the proposed algorithm, followed by the experimental setup and the parameters used in the simulations.

109A. DRL benchmarks.

110In order to assess the quality of the proposed algorithm, we compare the PAT agent with other DRL benchmark algorithms.

111• Greedy: For each new user in the system, the greedy algorithm checks whether the new user's VNF is already deployed in one of the CU servers. If so, computes the CPU and memory that the server would need to allocate to that VNF such that the new and existing users can be served from that VNF instance, i.e.,the resulting VNF's QoS lies in the range between QoS min and QoS max . If server's available resources allow for the calculated VNF resizing, the VNF is resized, and the user is allocated to that server (vertical scaling). If not, another server is checked until resources for the new user can be assigned (horizontal scaling). If no server is able to allocate this new user, the new user is offloaded to the cloud.

112• Cloud: This approach offload all the traffic to the cloud.

113• DRL benchmarks: To overcome the problem of discrete and continuous action selection formulated in this work, we use two distinct state of the art DRL algorithms. For server selection, discrete action, we use DDQN, while for parameter selection we use the following algorithms:

1141) DDPG [30] with an hyperbolic tangent activation function in the outer layer scaled by the maximum values of the CPU and memory, respectively.

1152) A3C [32], where the output of the DNNs provide the mean and variance values of the Gaussian distributions used to sample the values of the CPU and memory. The parameter T of [32], is chosen to be 128.

1163) DDQN [28], where we discretize the CPU and memory action, with a resolution of 5, meaning that the total number of actions is given by η max /5 × ρ max /5.

117The DDQN for discrete action selection, and the previous set of algorithms are trained recursively (discrete action network training first, followed by parameter network training)

118for 1000 times. Each algorithm interacting with the environment a 10000 time-slots.

B. Parameters

119In our experimental setup, we consider N = 10 VNFs that can be instantiated by the users to be deployed in the network, with features shown in Table I. We consider a CU with K = 10 servers each with a CPU capability of 50C Hz (ρ max = 50) and memory capacity of 50B bits (η max = 50). The arrival rates (λ Table I. The values of the other parameters involved in the calculation of the cost function and those used to reinforce the actor behaviours are given in Table II. The PAT algorithm parameters are collected in Table III. We note that the values presented in Tables I, II and III for to a solution with a balanced allocation of available resources in the servers and the cloud.

120Naturally, the value of these parameters in practice depends highly on the implementation and the technology used (memory/CPU capability) as well as the VNFs being considered; however, our problem formulation is general, and we have reached similar observations with a large variety of parameter values considered.

C. PAT performance

121The proposed PAT algorithm is run using 10 different seeds, and the average learning curves are depicted in Figure 3. Given the cost function in (13), it can be seen that the agent maximizes the SLA to the point where the cost function is negative, meaning that the perceived QoS is greater than the weighted combination of the latency and the economical costs. Thus, given the predefined cost function, the agent learns to minimize the cost and to utilize the servers in an online manner. That is, since the agent generates its own dataset on the fly, by interacting with the environment, variations in the environment are directly fedback into the model by adding new traces into the memory buffer. Therefore, when a statistically significant change occurs, this is captured by the model.

D. Mapping to KPIs

122We now define three KPIs for MANO in 5G networks, and map the results obtained with the PAT algorithm to these KPIs. The following KPIs are of interest for future 5G networks [33]:

123• Resource utilisation efficiency: Given the CPU and memory resources, resource utilisation efficiency is defined as the ratio of utilized resources with respect the total available resources for the execution of a VNF, for a particular number of users. With the elastic functions employed in our model, the system should achieve a higher resource utilisation efficiency, since it can shelter a much larger number of users over the same physical infrastructure.

124• Cost efficiency gain: This metric captures the average cost of deploying and maintaining the network infrastructure to provide the required service to its users. Given the elastic nature of the VNFs deployed, the CU should be able to optimally dimension the network such that less resources are required to support the same services; in addition, the elastic system should avoid the usage of unnecessary resources.

E. PAT evaluation

125In Figure 4 and 5, we present the results of the proposed PAT approach and that of the other benchmark algorithms. The comparison is carried out under exactly the same traffic patterns,

126i.e., same arrival and departure times.

127From Figures 4(a), 4(b) and 5(c) it can be observed that the particular set of parameters chosen for this network configuration entails that users offloaded to the cloud experience higher delays than the users served by the CU. On the contrary, for the financial cost, VNFs instantiated in the CU have a higher cost than VNFs instantiated in the cloud. That explains why the scheme with lowest cloud utilization, i.e., greedy, has the lowest delay per user but the highest financial cost per user.

128Furthermore, Figure 5(c) shows how all the DRL algorithms decide to allocate more users to the cloud than the CU, this is mainly for two reasons affecting the learning process:

1291) The VNF cloud allocation does not carry any penalty. Contrary to VNF allocation in the CU, where algorithms are penalised if the physical limitations of the servers are not respected or allocated resources are not enough to fulfill the SLA, the deployment of VNFs at the CU carry a positive reward.

1302) The QoS drives the learning experience. Since ω 3 is greater than the other two weights scaling the costs functions defined in Eqn. (13) and (14), algorithms aim to maximize SLA cost (given the RL reward function of (27)). Thus, as allocating VNF to CU may lead to lower QoS if the CU fails to provide the maximum demanded resources, the DRL tends to use the cloud where QoS max is guaranteed.

1) Resource utilisation efficiency:

131A comparison of the resource utilisation is presented in 2) Cost efficiency gain: The comparison between the averaged economical cost of the PAT deployment and the other schemes is presented in Figure 4(b), where a gain in economical cost by the PAT algorithm is clearly visible. The economical cost difference between the PAT and the greedy is straightforward, as the network configuration used entails a higher cost for the use of CU resources. The reduction of financial cost of the PAT compared to the other DRL algorithms is because the latter allocate more CPU and memory than needed, given the fact that most of their traffic is directed to the cloud, such that the CU resources are underutilized, incurring higher cost per user. It is somewhat surprising that the greedy algorithm performing comparably, or sometimes even better than the baseline DRL algorithms at some time periods. This is because the DRL algorithms, in contrast to PAT, have delays in adapting to the randomness of the environment, or tend to slightly over-provision resources to be able to cope with highly time-variant traffic demands. If, however, we keep the traffic statistics (arrival rates) constant, we can see in Figure 6 that baseline DRL algorithms outperform greedy, although PAT is still the best performing algorithm. This shows that PAT not only outperforms other baselines in exploiting the resources in the most efficient manner in a static environment, but also is the fastest in terms of adapting to variations in the environment.

VII. CONCLUSIONS AND FUTURE WORK

132We presented a novel DRL algorithm for autonomous management and orchestration of VNFs, where the CU learns to re-configure resources (CPU and memory), to deploy new VNFs instances, and to offload VNFs to a central cloud depending on network conditions, VNFs' requirements and the pool of available resources. We formulated the stochastic problem of resource allocation for a radio access network, where a group of BSs are connected to a CU that needs to provision and manage resources for the BS users as a Markov decision problem. Then, we proposed a DRL-based solution for this MANO problem, more precisely, we presented a novel approach named PAT, which leverages the actor-critic method to learn to provision network resources to the VNFs in an online manner, given the current network state and the requirements of the deployed VNFs. The novel architecture implements two critics for action value function estimation (twin), and two actor networks are used to determine the action and the parameter. A deterministic policy is implemented for both action and parameter selection. We have shown that the proposed solution outperforms all benchmark DRL schemes as well as heuristic greedy allocation in a variety of network scenarios, including static traffic arrivals as well as highly time-varying traffic settings. To the best of our knowledge, this is the first work that considers DRL for network MANO of VNFs.

133As future research directions, we consider addressing the MANO of VNF chains. The problem addressed in this work does not take into account the likely relation between different VNFs to form VNF chains, where NFs may have a temporal ordering in which they are requested by users. This factor highly increases the complexity of resource allocation as the overall user experience might be affected by a subtle VNF resource modification. Furthermore, another interesting direction might be the use of hierarchical DRL approach to be able to coordinate at the same time the network slice requirements with the sub-VNFs instantiated by those slices when deployed in a shared pool of resources.

참고문헌 33건

  1. Threshold Based Auto Scaling of Virtual Machines in Cloud Environment Lecture notes in computer science · Springer Science+Business Media · 2014 10.1007/978-3-662-44917-2_21
  2. Introduction to Reinforcement Learning MIT Press eBooks · MIT Press · 1998
  3. Understanding the difficulty of training deep feedforward neural networks 2010
  4. Language Understanding for Text-based Games using Deep Reinforcement Learning Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · 2015 10.18653/v1/d15-1001
  5. VScaler: Autonomic Virtual Machine Scaling 2013 10.1109/cloud.2013.142
  6. A Review of Auto-scaling Techniques for Elastic Applications in Cloud Environments Journal of Grid Computing · Springer Science+Business Media · 2014 10.1007/s10723-014-9314-7
  7. Wireless Network Virtualization: A Survey, Some Research Issues and Challenges IEEE Communications Surveys & Tutorials · Institute of Electrical and Electronics Engineers · 2014 10.1109/comst.2014.2352118
  8. Network function virtualization: Challenges and opportunities for innovations IEEE Communications Magazine · Institute of Electrical and Electronics Engineers · 2015 10.1109/mcom.2015.7045396
  9. Human-level control through deep reinforcement learning Nature · Nature Portfolio · 2015 10.1038/nature14236
  10. Deterministic policy gradient algorithms HAL (Le Centre pour la Communication Scientifique Directe) · Centre National de la Recherche Scientifique · 2014
  11. SmartScale: Automatic Application Scaling in Enterprise Clouds 2012 10.1109/cloud.2012.12
  12. Continuous control with deep reinforcement learning arXiv (Cornell University) · Cornell University · 2015 10.48550/arxiv.1509.02971
  13. Dueling network architectures for deep reinforcement learning 2016
  14. A Framework and Algorithm for Energy Efficient Container Consolidation in Cloud Data Centers IEEE International Conference on Data Science and Data Intensive Systems · 2015 10.1109/dsdis.2015.67
  15. Efficient Auto-Scaling Approach in the Telco Cloud Using Self-Learning Algorithm 2015 IEEE Global Communications Conference (GLOBECOM) · 2015 10.1109/glocom.2015.7417181
  16. Containers and Virtual Machines at Scale 2016 10.1145/2988336.2988337
  17. Addressing Function Approximation Error in Actor-Critic Methods arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1802.09477
  18. The path towards resource elasticity for 5G network architecture 2018 10.1109/wcncw.2018.8369027
  19. Auto-Scaling VNFs Using Machine Learning to Improve QoS and Reduce Cost 2018 10.1109/icc.2018.8422788
  20. Auto-Scaling Network Resources using Machine Learning to Improve QoS and Reduce Cost arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1808.02975
  21. Comparative Study of Virtual Machines and Containers for DevOps Developers SSRN Electronic Journal · Social Science Electronic Publishing · 2023 10.2139/ssrn.4404383
  22. Deep Reinforcement Learning for Resource Management in Network Slicing IEEE Access · Institute of Electrical and Electronics Engineers · 2018 10.1109/access.2018.2881964
  23. Dueling Network Architectures for Deep Reinforcement Learning arXiv (Cornell University) · Cornell University · 2015 10.48550/arxiv.1511.06581
  24. Deep Reinforcement Learning With Discrete Normalized Advantage Functions for Resource Management in Network Slicing IEEE Communications Letters · IEEE Communications Society · 2019 10.1109/lcomm.2019.2922961
  25. Optimized Computation Offloading Performance in Virtual Edge Computing Systems Via Deep Reinforcement Learning IEEE Internet of Things Journal · Institute of Electrical and Electronics Engineers · 2018 10.1109/jiot.2018.2876279
  26. Deep Reinforcement Learning in Parameterized Action Space arXiv (Cornell University) · Cornell University · 2015 10.48550/arxiv.1511.04143
  27. Continuous control with deep reinforcement learning arXiv (Cornell University) · Cornell University · 2016
  28. Asynchronous Methods for Deep Reinforcement Learning arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1602.01783
  29. Multi-Tenant Cross-Slice Resource Orchestration: A Deep Reinforcement Learning Approach IEEE Journal on Selected Areas in Communications · Institute of Electrical and Electronics Engineers · 2019 10.1109/jsac.2019.2933893
  30. Machine Learning in the Air IEEE Journal on Selected Areas in Communications · Institute of Electrical and Electronics Engineers · 2019 10.1109/jsac.2019.2933969
  31. Power Consumption of Virtualization Technologies: An Empirical Investigation 2015 10.1109/ucc.2015.93
  32. Deterministic Policy Gradient Algorithms HAL (Le Centre pour la Communication Scientifique Directe) · Le Centre pour la Communication Scientifique Directe · 2014
  33. Comparative Study of Virtual Machines and Containers for DevOps Developers arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1808.08192