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

  1. Enter Clusters → select the cluster name.
  2. Specify the CPU overselling ratio in the General settings section
  3. Press Save

You can also specify the overselling ratio when creating a cluster.

 

CPU overselling configuration for a cluster

For a cluster node

  1. Enter Nodes → select the node name.
  2. Click on VM distribution settings.
  3. Specify the Limit the vCPU number — the maximum number of vCPUs that can be allocated to a VM on this node.
  4. 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

  1. Enter Clusters → select the cluster name.
  2. Specify the RAM overselling rate on the node in the General settings section
  3. Press Save

You can also specify the overselling ratio when creating a cluster. 

RAM overselling configuration for a cluster

For a cluster node

  1. Enter Nodes → select the node name.
  2. Click on VM distribution settings.
  3. Specify the Overselling rate. 
  4. 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

  1. Enter Nodes → select the node → Local Storages .
  2. Enter the overselling rate.

  3. Press Save.

Configuration in the cluster card

  1. Enter Clusters → select the node → Local Storages.
  2. Press Edit in the Overselling column.

  3. Enter the overselling factor.

  4. Press Save.

Configuration via API

  1. Get an authorization token

    curl -X POST 'https://domain.com/auth/v4/public/token' -d '{"email": "admin_email", "password": "admin_pass"}'
    CODE

    domain.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"
    }
    CODE

    Save the token value from the received response.

  2. 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>}'
      CODE

      <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>}'
      CODE

      <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.