Overselling
Overselling allows you to sell more server resources than you actually have. If a hosting provider uses overselling, it can host more virtual machines (VMs) without increasing server capacity. In this case, in fact, no more resources will be allocated to the VM than are available on the server.
For example, a provider sells and deploys a VM on a server with 32 Gb RAM. The tariff plan allocates 4 Gb RAM per VM. This way, the provider can sell 8 VMs. To accommodate a larger number of VMs, the provider has enabled overselling with a ratio of 1.5 for the server. Available RAM has increased to 48 Gb and now the server can host 12 VMs.
Overselling is possible provided that VMs consume less resources than were allocated to them. For example, the VM is allocated 4 Gb RAM, but only 1 Gb is actually used. Free RAM can be used to create other VMs.
Note
When started, VMs use the entire RAM allocated to them. If this causes the server to have no free memory, some system processes may crash.
Note
Overselling can reduce the overall performance of created VMs.
Overselling in VMmanager
VMmanager supports overselling of:
- CPU;
- RAM;
- disk space — only for file storage and ZFS.
You can specify CPU and RAM overselling rates for the cluster and for each cluster node separately. Disk space ratios can be specified for the cluster storage and separately for the storage of each node. To calculate the available resource amount, VMmanager will multiply the actual amount by the specified rate.
When a cluster node is connected, its overselling rates are the same by default as those of the cluster. If you change the rates for the cluster, they will not be changed for nodes already connected. The new rates only apply to new nodes.
Overselling information is displayed in the Nodes list.
Overselling information
How to configure CPU overselling
For a cluster
- Enter Clusters → select the cluster name.
- Specify the CPU overselling ratio in the General settings section.
- Press Save.
You can also specify the overselling ratio when creating a cluster.
CPU overselling configuration for a cluster
For a cluster node
- Enter Nodes → select the node name.
- Click on VM distribution settings.
- Specify the Limit the vCPU number — the maximum number of vCPUs that can be allocated to a VM on this node.
- Click on Save.
You can also specify the overselling ratio when connecting a node.
CPU overselling configuration for a cluster node
How to configure RAM overselling
For a cluster
- Enter Clusters → select the cluster name.
- Specify the RAM overselling rate on the node in the General settings section.
- Press Save.
You can also specify the overselling ratio when creating a cluster.
RAM overselling configuration for a cluster
For a cluster node
- Enter Nodes → select the node name.
- Click on VM distribution settings.
- Specify the Overselling rate.
- Click on Save.
You can also specify the overselling ratio when connecting a node.
RAM overselling configuration for a cluster node
How to configure disk overselling
You can configure the overselling factor for the cluster node storage in the platform interface or via API, while for the cluster storage – only via API. In the platform interface, overselling can be configured in the node or the cluster card.
Configuration in the node card
- Enter Nodes → select the node → Local Storages →
.
- Enter the overselling rate.
- Press Save.
Configuration in the cluster card
- Enter Clusters → select the node → Local Storages.
- Press Edit in the Overselling column.
- Enter the overselling factor.
- Press Save.
Configuration via API
Get an authorization token
curl -X POST 'https://domain.com/auth/v4/public/token' -d '{"email": "admin_email", "password": "admin_pass"}'
CODEComments to the commanddomain.com — domain name or IP address of the server with the platform
admin_email — platform administrator's email
admin_pass — platform administrator's password
In response, you will get the message in the form:
Example of response in JSON
{ "confirmed": true, "id": "6", "token": "4-e9726dd9-61d9-2940-add3-914851d2cb8a" }
CODESave the token value from the received response.
- Set the disk overselling ratio:
for a cluster storage:
curl -H "x-xsrf-token: <token>" https://domain.com/vm/v3/cluster/<cluster_id>/storage/<storage_id>/hdd_overselling -d '{"value":<ratio>}'
CODEComments to the command<token> — authorization token
domain.com — domain name of the server with VMmanager
<cluster_id> — VMmanager cluster id
<storage_id> — VMmanager storage id
<ratio> — disk overselling ratio. The minimum value is 0.5, the maximum value is 5.
for a storage of the cluster node:
curl -H "x-xsrf-token: <token>" https://domain.com/vm/v3/node/<node_id>/storage/<storage_id>/hdd_overselling -d '{"value":<ratio>}'
CODEComments to the command<token> — authorization token
domain.com — domain name of the server with VMmanager
<node_id> — VMmanager cluster node id
<storage_id> — VMmanager storage id
<ratio> — disk overselling ratio. The minimum value is 0.5, the maximum value is 5.