The MobiledgeX platform provides you with the ability to choose the amount of cpu, memory, and disk that you require for your application. Additional features - such as the addition of a GPU - are supported as well.
The combination of a defined value for each of these three resources plus any additional features is referred to within the MobiledgeX platform as a flavor
.
The term flavor
originates from the OpenStack ecosystem, and is used by the MobiledgeX platform to provide a simple way to refer to a given resource configuration. The following resource dimensions are included as part of the flavor
definition in the platform.
opt_res_map
, as these are considered additional resources outside of the core resources.The term vCPU
is a term frequently used in hardware virtualization, and is a way to try and quantify the amount of performance you can expect from a virtual machine. For a developer, the assumption is that if you have a virtual machine that is defined with 2 vCPUs you can roughly expect the level of performance you would receive from a bare metal server with two CPU cores. Operators are able to use vCPU as a way to divide the available virtual cores in a server amongst the tenants running on that server.
The reality is a bit more complex. In brief, although some vendors map physical cores to vCPU, the reality is that vCPU is more a measure of processing time on the cpu.
In terms of deployments on the MobiledgeX you should expect a vCPU to roughly equate to that many physical cores in a modern datacenter class server, although there may be some variation depending on the type and age of the underlying hardware.
MobiledgeX does not currently support vGPU access. However, pass-through GPU is supported for cloudlets that have GPU availability. These cloudlets will have the GPU as a dimension of the available flavors.
In the MobiledgeX platform, application instances are hosted on cluster instances. The defined flavor, either the default flavor for the application or the flavor for the cluster instance, defines the resources available to the application instance. As additional application instances are deployed, additional cluster instances are created to host the new application instances. Since a cluster instance exists solely to support a deployed application instance the resources provided to the cluster instance can viewed as those being provided to the application instance.
Flavors are also used in virtual machine deployments, with the sole difference being that the resources are provided to the virtual machine directly as opposed to container based workloads where a host cluter receives the provided resources.
This article on How to Size Your Backend Deployment provides one suggested methodology determining the correct size for a backend deployment.
Flavors are guaranteed consistent within a region, and are managed at the region level. However, be aware that not all cloudlets support all flavors; the flavors supported on a given cloudlet are defined by the cloudlet operator.
mcctl
You can view the flavors using mcctl region ShowFlavors
command. This command requires the specification of a region
and an optional series of filters. Without a filter, all defined flavors are shown.
Usage: mcctl region ShowFlavor [flags] [args]
Required Args:
region Region name
Optional Args:
name Flavor name
ram RAM in megabytes
vcpus Number of virtual CPUs
disk Amount of disk space in gigabytes
optresmap Optional Resources request, key = [gpu, nas, nic] gpu kinds: [gpu, vgpu, pci] form: $resource=$kind:[$alias]$count ex: optresmap=gpu=vgpus:nvidia-63:1
$ mcctl --output-format json --addr https://console.mobiledgex.net region ShowFlavor region=EU name=m4.small
[
{
"key": {
"name": "m4.small"
},
"ram": 2048,
"vcpus": 2,
"disk": 20
}
]
You can also request information on the defined flavors directly through the API. Note that a discussion of how to authenticate to the API and the resty
tool which is used to illustrate this test is available here.
$ POST /auth/ctrl/ShowFlavor '{"region": "EU"}'
{"data":{"key":{"name":"mex.large-gpu2"},"ram":8192,"vcpus":4,"disk":160,"opt_res_map":{"gpu":"gpu:1"}}}
{"data":{"key":{"name":"mex.medium-gpu"},"ram":8192,"vcpus":2,"disk":40,"opt_res_map":{"gpu":"gpu:1"}}}
{"data":{"key":{"name":"mex.small-gpu"},"ram":4096,"vcpus":2,"disk":40,"opt_res_map":{"gpu":"gpu:1"}}}
{"data":{"key":{"name":"m1.xxlarge24.500"},"ram":32768,"vcpus":24,"disk":500}}
{"data":{"key":{"name":"m4.small"},"ram":2048,"vcpus":2,"disk":20}}
{"data":{"key":{"name":"m4.xxlarge-16-32-120"},"ram":32768,"vcpus":16,"disk":120}}
{"data":{"key":{"name":"mstr-node-flav"},"ram":4096,"vcpus":2,"disk":40}}
{"data":{"key":{"name":"g3s.large"},"ram":8192,"vcpus":4,"disk":80,"opt_res_map":{"gpu":"gpu:1"}}}
{"data":{"key":{"name":"m4.medium"},"ram":4096,"vcpus":2,"disk":40}}
{"data":{"key":{"name":"mex.large"},"ram":16384,"vcpus":8,"disk":80}}
{"data":{"key":{"name":"m4.large"},"ram":8192,"vcpus":4,"disk":80}}
{"data":{"key":{"name":"x1.medium"},"ram":4096,"vcpus":4,"disk":4}}
{"data":{"key":{"name":"g3s.xlarge"},"ram":16384,"vcpus":8,"disk":160,"opt_res_map":{"gpu":"gpu:1"}}}
{"data":{"key":{"name":"m4.xlarge"},"ram":16384,"vcpus":8,"disk":160}}
{"data":{"key":{"name":"mex.xlarge-gpu"},"ram":32768,"vcpus":4,"disk":160,"opt_res_map":{"gpu":"gpu:1"}}}