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.


  • 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.
  • Overselling can reduce the overall performance of created VMs.

Overselling in VMmanager


VMmanager supports overselling of:

  • CPU;
  • RAM;
  • disk space — only for file storage, NAS, 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:

  • file storage and ZFS — for the cluster storage and separately for the storage of each node;
  • NAS — for the cluster storage only.

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

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. Click Save button.  

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

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. Click Save button

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

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 node or the cluster card. The overselling ratio for a file or ZFS storage of the cluster can only be specified via API.

Configuration in the node card

  1. Enter Nodes → select the node → Local Storages icon.
  2. Enter the Overselling ratio.

  3. Click Save button.

Configuration in the cluster card

File storage

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

  3. Enter the Overselling ratio.

  4. Click Save button.

NAS

  1. Enter Clusters → select the node → Network Storages → select the storage → icon.
  2. Enter the Overselling ratio.
  3. Click Save button.

Configuration via API

  1. Get an authorization token

    curl -k -X POST -H "accept: application/json" -H "Content-Type: application/json" '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,
      "expires_at": null,
      "id": "6",
      "token": "4-e9726dd9-61d9-2940-add3-914851d2cb8a"
    }
    CODE

    Save the received token value.

  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.