This topic describes how to enable the multiqueue feature for primary and secondary network interfaces associated with ECS instances.
Applicable scenario
The multiqueue feature can distribute network interrupts of an instance across multiple CPUs. This improves network performance and response speed. Additionally, the multiqueue feature can mitigate performance degradation due to the bottleneck where one vCPU handles all network interrupts.
Usage notes
The network interface multiqueue automatic configuration tool adjust-nic-queue currently supports only the following images:
Procedure
Automatically enable multiqueue via the tool
- Execute the following command to check whether the network interface supports the multiqueue feature and the number of enabled queues.
Replace eth0 with the name of the target network interface.
In the command output, if the Combined parameter values under Pre-set maximums and Current hardware settings are the same, it means that the multiqueue is enabled for the network interface. And no further actions are required.
- Execute the following commands to configure the extra-tools software source or download and install the package.
veLinux
CentOS
RHEL
Debian
Ubuntu
Rocky Linux
- veLinux 1.0 CentOS Compatible
- Execute the following commands to install the network interface multiqueue automatic configuration tool (adjust-nic-queue).
veLinux 1.0 CentOS Compatible/CentOS/Rocky Linux
RHEL
veLinux 1.0 & 2.0/Debian/Ubuntu
- After being installed, adjust-nic-queue automatically enables multiqueue for the primary and secondary network interfaces associated with the instance.
If you associate a new secondary network interface after installing the tool, restart the instance. This allows the tool to automatically enable the multiqueue feature of the new network interface when the instance restarts.
- Execute the following command to verify whether you enable the multiqueue feature.
Replace eth0 with the name of the target network interface.
- If the output appears as shown below, the multiqueue is enabled for the network interface eth0.
-
Manually enable multiqueue
- Execute the following command to check whether the network interface supports the multiqueue feature and the number of enabled queues.
Replace eth0 in the command with the name of the target network interface.
In the command output, if the Combined parameter value is the same under Pre-set maximums and Current hardware settings, it means that the multiqueue is enabled for the network interface. And no further actions are required.
- Execute the following command to manually adjust the queue count for the primary or secondary network interface to the maximum value.
tip
- Replace eth0 in the command with the name of the target primary or secondary network interface.
- Replace 4 in the command with the maximum number of queues supported by the network interface.
- Execute the following command to verify whether you enable the multiqueue feature.
Replace eth0 with the name of the target network interface.
- If the output appears as shown below, the multiqueue is enabled for the network interface eth0.
-