The present disclosure is directed to calculating the cost of logical capacity containers carved out of a virtual data center.
A data center is a facility that houses servers and data-storage devices and other associated components including backup power supplies, redundant data communications connections., environmental controls, such as air conditioning and fire suppression, and includes various security systems. A data center is typically maintained by an IT service provider. An enterprise purchases data storage and data processing services from the provider in order to run applications that handle the enterprises' core business and operational data. The applications may be proprietary and used exclusively by the enterprise or made available through a network for anyone to access and use.
In recent years, virtual machines (“VMs”) have been introduced to lower data center capital investment in facilities and operational expenses and reduce energy consumption. A VM is a software implementation of a computer that executes application software just like a physical computer. VMs have the advantage of not being bound to physical resources, which allows VMs to be moved around and scaled up or down to meet the changing demands of the enterprise without affecting use of the enterprise's applications. VMs can be used to form virtual data centers (“VDCs”) composed of virtual servers and virtual storage. For a typical VDC, it is common practice to allocate and reserve resources carved out of a data-center infrastructure layer to a user or user group without regard to whether the VMs have been created by the user or not. These logical entities of allocated resources are called “containers.” A container is a multi-dimensional logical entity composed of certain units of processing power, memory, storage, and network. However, determining the cost of a container is often challenging: 1) Because a container is a logical abstraction over the data-center infrastructure, infrastructure unit rates of cost consumption cannot be directly applied. 2) A container may also be created out of a parent container with a possibility of further division into children containers, which adds to the complexity. 3) A container can also commit more resources than the underlying layer provides, which adds to further complexity in arriving at the container's true cost. Enterprises that purchase IT services and IT service providers seek efficient methods and systems for assessing the cost of containers.
The disclosure presents methods and systems for determining cost allocation for logical containers run on a data-center infrastructure. In one aspect, for each resource allocated to one or more logical containers, a method calculates a resource allocation value for each of the one or more logical containers, the resource allocation value represents an amount of the resource allocated to the logical container. An allocated container cost is then calculated for each the one or more logical containers based on the resource allocation value of each logical container. A cost of unused portions of the resource for each of the one or more logical containers is calculated based on the allocated container cost and the resource allocation value associated with each logical container. The resource allocation value, the allocated container cost and the cost of unused portion of the resource are stored in one or more data-storage devices.
This disclosure presents computational methods and systems for calculating costs associated with containers in order to prevent over and under allocation of resources and justify cost distribution. Methods and systems described below provide efficient computational mathematical tools for determining allocated cost of resource used by each container, cost of unallocated portions of a resource, cost of unused portions of a resource, other allocated and unallocated cost that aid in assessing over and under allocation of resources to containers.
It should be noted at the onset that data related to calculating allocated and unallocated container costs is not, in any sense, abstract or intangible. Instead, the data is necessarily digitally encoded and stored in a physical data-storage computer-readable medium, such as an electronic memory, mass-storage device, or other physical, tangible data-storage device and medium. It should also be noted that the currently described data-processing and data-storage methods cannot be carried out manually by a human analyst, because of the complexity and vast numbers of intermediate results generated for processing and analysis of even quite modest amounts of data. Instead, the methods described herein are necessarily carried out by electronic computing systems on electronically or magnetically stored data, with the results of the data processing and data analysis digitally encoded and stored in one or more tangible, physical, data-storage devices and media.
Data centers house computer equipment, telecommunications equipment, and data-storage devices. A typical data center may occupy one room of a building, one or more floors of a building, or may occupy an entire building. Most of the computer equipment is in the form of servers stored in cabinets arranged in rows with corridors between the rows in order to allow access to the front and tear of each cabinet.
Containers are composed of a number of virtual machines (“VMs”) and each container is allocated physical resources of the data-center infrastructure. For example, resources allocated to a container include processors, memory, data-storage devices, and network, just to name a few. The resources allocated to a container are not limited to just one server. A container may he allocated resources of any number of servers in the data center.
Data-center users and IT service providers agree upon policies to be followed in defining logical container Ci. Three common parameters used to define containers are reservation, limit, and priority. Reservation is the minimum amount of the resources which are guaranteed to be available for the container. Limit is the maximum amount of the resources that can be made available to the container provided the parent container/resource pool provides for a limit. Priority is the order in Which requests for resources may he allocated to the container, in the case of current requests from containers with different priorities and limited availability of the resources. In the case where resources are over committed to the containers, priority will he used for resource allocation. The different policy parameters- ensure a data-center user of quality and quantity of resources. The different policy parameters enable IP server providers to plan infrastructure needs based on requests and provide adequate services. The policy parameters enable a service provider to charge users fairly. In particular, service providers may be able to charge users not only on their utilization of various resources, but may also be able to charge based on policies chosen by the user while getting access to the resources.
Methods and systems for determining allocated and unallocated costs associated with containers are now described. In the follow discussion, the cost of a data-center resource is denoted by cr and a total capacity for the resource is denoted by Tr, where the subscript r is a physical data-center resource index. For example, the cost of six data-center resources are represented by cproc, cmem, cstor, cNet
Methods also use a resource allocation function for a container Ci denoted by fr (Ci).. A resource allocation function for a resource used by a container gives a numerical resource allocation value that represents an amount of a resource allocated to the container. For example, a resource allocation function ƒr(Ci) may be a numerical value that represents utilization of the resource, denoted by util (Ci), an agreed upon reservation of the resource denoted by res(Ci), or a limit the amount of the resource that may be used denoted by limit(Ci).
Methods and systems calculate various cost and capacity parameters associated with a container. These parameters now described may be used to calculate costs associated with each container in order to prevent over and under allocation of resources and justify cost distribution. In particular, methods and systems now described may be used to calculate a total cost of all the containers running on the servers, total unallocated container cost for all the containers, and a total cost for unallocated server resources.
As described above, a resource allocation function ƒr(Ci) gives a resource allocation value that represents the amount of the resource r allocated to a container Ci. Summing ƒr(Ci) for all N containers allocated use of the resource r gives a total allocation of the resource r to the N containers:
Subtracting the total allocation of the resource r to the N containers given in Equation (1) from the total capacity of the resource Tr gives a total unallocated capacity for the resource r:
U
r
=T
r
−A
r (2)
The total unallocated resource capacity Ur, resource cost Cr, and total capacity of the resource Tr may he used to calculate a cost of the total unallocated capacity of the resource r:
Allocated container cost for a resource r used by a container Ci may be calculated from the resource allocation function ƒr(Ci). The cost of a resource Cr, and the total capacity of the resource Tr as follows:
The portion of the resource r that is riot used by the container ci is given by an unallocated container capacity:
U
r(Ci)=ƒr(Ci)−utilr(Ci) (5)
The unallocated container capacity Ur(Ci), the resource allocation function ƒr(Ci), and the allocated container cost ccr(Ci) are used to calculate the cost of unused portions the resource r allocated to the container Ci:
The allocated container cost ccr(Ci) of each resource calculated according to Equation (4) may be summed for all of the resources allocated to the container Ci to give a total cost of all the resources r allocated to the container Ci:
On the other hand, the unallocated container cost of each resource calculated according to Equation (6) may be summed for all of the resource to give a total cost of all the unused portions resources r allocated to the container Ci:
Summing the cost for all of the unallocated resources r calculated according to Equation (8) gives a total cost of all unallocated resources:
An example of using Equations (1)-(9) to calculate container costs, unallocated container capacity, and unallocated container costs for three example containers sharing the same memory resource are now described with reference to
The containers, agreements, limits, reservations, and actual utilization of the memory are selected to demonstrate that when there are a number of permutations for allocating the cost of a resource to containers, certain containers may end up over-allocating or under-allocating the resource. This particular example demonstrates how to determine the unallocated cost of a resource remaining at the server level as well as the container level. This example will also demonstrate use of the resource allocation function for memory described above with reference to table entry 304 in
Begin by calculating the allocation of memory to each of the containers according to the resource allocation function given in table entry 305 of
ƒmem(C1)=max(0,20)=20 GB
ƒmem(C2)=max(50,20)=50 GB
ƒmem(C3)=max(10,20)=20 GB
Summing ƒmem(C1), ƒmem(C2), and ƒmem(C3) according to Equation (1) gives 90 GB as the total allocation of memory to the three containers. According to Equation (2), the total unallocated resource capacity is
In other words, 10 GB or 10% of the 100 GB of memory on one or more servers 402 is not allocated. According to Equation (3), the cost of the 10 GB unallocated portion of the 100 GB of memory is
The cost of the unallocated portion of the memory Ucmem=$100 may be viewed by the IT service provider as under allocating the total memory capacity. Equation (4) ma be used to calculate the allocated container cost of the memory to each of the containers as follows:
Equation (5) may be used calculate the unutilized portion of the memory for each of the containers:
U
mem(C1)=20 GB−20 GB=0 GB
U
mem(C2)=50 GB−20 GB=30 GB
U
mem(C2)=20 GB−20 GB=0 GB
In this example, the container C2 does not use all of the reserved memory by leaving 30 GB unused. The cost of unused portions of the memory for each container is calculated according to Equation (6) as follows:
The cost of unused reserved memory Umem(C2)=30 GB for the container C2 is U ccmem(C2)=$300.
It should be noted that the above described functions represented in Equations (1)-(9) and ways to distribute cost to containers in proportion to the resource allocation functions may be applied to nested containers. For example, Equations (1)-(9) may be applied to child containers carved out of a parent container.
It may be the case that the total capacities of certain data-cente resources are not available for full allocation to the containers. Instead a user or system defined “expected allocation” of certain resources it used, and the cost is allocated accorded to the expected allocation. For example, a resource r may have a total capacity Tr, but the expected allocation of the resource is αTr, where α is a resource allocation parameter and 0<α<1. This unallocated portion the resource (1−α)Tr is called “buffer capacity,” which may be reserved to handle peak demands. When Σi=1Nƒr(Ci)≦αTr, the buffer capacity, (1−α)Tr, may be neglected. As a result, the total capacity Tr of the resource available to the containers is reassigned to Tr=αTr, allocation of cost is performed in Equations (1)-(9) for Tr=αTr, and there may he unallocated costs. On the other hand, when Σi=1Nƒr(Ci)>αTr, the expected allocation αTr may be neglected and the total capacity of the resource Tr, is reset to the actual amount of the resource utilized by the containers, Tr=Σi=1Nƒr(Ci). Cost allocation is performed using Equations (1)-(9) for Tr=Σi=1Nƒr(C1) and there is no expectation of unallocated cost.
Although various implementations have been described in terms of particular embodiments, it is not intended that the disclosure be limited to these embodiments. Modifications within the spirit of the disclosure will be apparent to those skilled in the art. For example, any of a variety of different implementations can be obtained by varying any of many different design and development parameters, including programming language, underlying operating system, modular organization, control structures, data structures, and other such design and development parameters.
It is appreciated that the previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present disclosure, Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to he limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Number | Date | Country | Kind |
---|---|---|---|
1427/CHE/2014 | Mar 2014 | IN | national |
Benefit is claimed under 35 U.S.C. 119(a)-(d) to Foreign application Serial No. 1427/CHE/2014 filed in India entitled “METHODS AND SYSTEMS FOR CALCULATING THE COST OF LOGICAL CAPACITY CONTAINERS”, filed on Mar. 18, 2014, by VMware. Inc., which is herein incorporated in its entirety by reference for all purposes.