# Toggle the NIC Multi-Queue Property

You can use the [<mark style="color:blue;">DCD</mark>](https://docs.ionos.com/sections-test/guides/network-services/vdc-networking/nic-multi-queue/how-tos/toggle-nic-multi-queue) or [<mark style="color:blue;">IONOS Cloud API</mark>](https://api.ionos.com/docs/cloud/v6/#tag/Servers) to turn NIC Multi-Queue on or off for a [<mark style="color:blue;">Virtual Machine (VM)</mark>](https://docs.ionos.com/cloud/support/general-information/glossary-of-terms#virtual-machine-vm).

Set the `nicMultiQueue` property to one of the following values:

* `true` to turn on the feature.
* `false` to turn off the feature.

{% hint style="info" %}
**Note:**

* **Automatic VM Restart:** Setting NIC Multi-Queue on triggers an automatic VM restart to apply the configuration changes.
* **Hot-Plug NIC Support:** You can add network interfaces to a running VM without system restart or downtime. For optimal performance, new NICs automatically default to number queues that match the number of provisioned CPU threads.
* **Scaling Queue Count:** When adding CPU threads to leverage increased parallelism, the queue count must be updated through a VM restart:
  * Restart the VM using the [<mark style="color:blue;">Cloud API</mark>](https://api.ionos.com/docs/cloud/v6/#tag/Servers) or the [<mark style="color:blue;">Data Center Designer (DCD)</mark>](https://docs.ionos.com/sections-test/guides/set-up-ionos-cloud/data-center-designer).
  * An Operating System (OS)-level restart is insufficient and will not update the queue configuration. Queue count changes require a platform-initiated restart to reload the NIC driver with the updated configuration.
    {% endhint %}

## Endpoint

Use the following endpoint to turn on NIC Multi-Queue for your VM: `https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/servers/{server-uuid}`.

{% hint style="info" %}
**Note:** Remember to update the `datacenterId` and the `server-uuid` with their relevant values.
{% endhint %}

## Request

```bash
curl --location \
--request PATCH 'https://api.ionos.com/cloudapi/v6/datacenters/fd16-e4-44-b9-daaaaah75/servers/15f67991-0f51-4efc-a8ad-ef1fb31a480c' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiO' \
--header 'Content-Type: application/json' \
--data-raw '{
"nicMultiQueue": true
}'
```

{% tabs %}
{% tab title="Path Parameters" %}
Remember to update the `datacenterId` value with your data center's ID:

| **Path Parameter** | **Type** | **Description**                   | **Example**               |
| ------------------ | -------- | --------------------------------- | ------------------------- |
| `datacenterId`     | string   | The ID (UUID) of the data center. | `fd16-e4-44-b9-daaaaah75` |
| {% endtab %}       |          |                                   |                           |

{% tab title="Request Body Parameters" %}
Below is the list of mandatory body parameters required to update the status of an NIC Multi-Queue ready VM:

| **Body Parameters**           | **Required** | **Type**                                         | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                      | **Example**                           |
| ----------------------------- | ------------ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `metadata`                    | no           | object                                           | Metadata                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `{}`                                  |
| `properties.name`             | yes          | string                                           | The name of the resource.                                                                                                                                                                                                                                                                                                                                                                                                                                            | `My resource`                         |
| `properties.hostname`         | yes          | string                                           | The hostname of the resource. Allowed characters are `a-z`, `0-9`, and `-` (minus). Hostname should not start with minus and should not be longer than 63 characters.                                                                                                                                                                                                                                                                                                | `Tunnel connecting site A to site B.` |
| `properties.cores`            | yes          | integer                                          | The total number of cores for the server. It can not be supplied for the VMs that have to be created based on templates.                                                                                                                                                                                                                                                                                                                                             | `203.0.113.1`                         |
| `properties.ram`              | yes          | integer                                          | The memory size for the server in MB, such as `2048`. Size must be specified in multiples of `256` MB with a minimum of `256` MB; however, if you set `ramHotPlug` to `TRUE` then you must use a minimum of `1024` MB. If you set the RAM size more than `240GB`, then `ramHotPlug` will be set to `FALSE` and can not be set to `TRUE` unless RAM size not set to less than `240GB`. It can not be supplied for the VMs that have to be created based on templates. | `4096`                                |
| `properties.availabilityZone` | yes          | string. **Enum:** `AUTO` `ZONE_1` `ZONE_2`       | The availability zone in which the server should be provisioned.                                                                                                                                                                                                                                                                                                                                                                                                     | `AUTO`                                |
| `properties.cpuFamily`        | yes          | string                                           | CPU architecture on which server gets provisioned; not all CPU architectures are available in all datacenter regions; available CPU architectures can be retrieved from the datacenter resource; must not be provided for VCPU servers. If the field is omitted from the request or the value is empty or null, an available CPU architecture will be automatically selected.                                                                                        | `INTEL_ICELAKE`                       |
| `properties.type`             | yes          | string. **Server type:** `ENTERPRISE` or `VCPU`. | `ENTERPRISE`                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                       |
| `properties.nicMultiQueue`    | yes          | boolean                                          | Turn the NIC Multi-Queue feature on or off for all NICs of this server. This feature is beneficial when the NICs are experiencing performance issues, such as, low throughput. Toggling this feature will also initiate a restart of the server. If set to `true`, the feature turns on. If set to `false`, the feature turns off.                                                                                                                                   | `true`                                |
| {% endtab %}                  |              |                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |                                       |

{% tab title="Request Header Parameters" %}
To make authenticated requests to the API, the following fields are mandatory in the request header:

| **Header Parameters** | **Required** | **Type** | **Description**                                                                  |
| --------------------- | ------------ | -------- | -------------------------------------------------------------------------------- |
| `Authorization`       | yes          | string   | The Bearer token to allow requests to authenticate using a JSON Web Token (JWT). |
| `Content-Type`        | yes          | string   | Set this to `application/json`.                                                  |
| {% endtab %}          |              |          |                                                                                  |
| {% endtabs %}         |              |          |                                                                                  |

## Response

**201 Successful operation**

```json
{
    "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
    "type": "server",
    "href": "<RESOURCE-URI>",
    "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "user@example.com",
        "createdByUserId": "user@example.com",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "user@example.com",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
    },
    "properties": {
        "templateUuid": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
        "name": "My resource",
        "hostname": "myHostname",
        "cores": 4,
        "ram": 4096,
        "availabilityZone": "AUTO",
        "vmState": "RUNNING",
        "cpuFamily": "INTEL_ICELAKE",
        "type": "ENTERPRISE",
        "nicMultiQueue": true
    }
}
```
