Enabling Features
Configure the basic environment and enable the features based on site requirements.
- Enable only the network multipathing feature.
- Enable only the domain-based scheduling feature.
- Enable both the network multipathing and domain-based scheduling features.
Configuring the Basic Environment
- Before enabling the features, run the following commands on the server to configure the basic environment.
1 2 3 4 5 6 7
systemctl stop firewalld.service systemctl disable firewalld.service sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux setenforce 0 systemctl stop irqbalance.service systemctl disable irqbalance.service swapoff -a
- Set firewalld to clear kernel modules when it exits.
1sed -i "s/CleanupModulesOnExit=no/CleanupModulesOnExit=yes/g" /etc/firewalld/*.conf
- Restart the firewalld service.
1systemctl restart firewalld
- Stop the firewalld service.
1systemctl stop firewalld
Enabling the Network Multipathing Feature
- Disable irqbalance.
1systemctl stop irqbalance
- The network multipathing modules depend on the hisi_l3t.ko module. Check whether the module has been loaded.
1lsmod | grep hisi_l3t
If the command output is empty, load hisi_l3t.ko.1modprobe hisi_l3t - Decompress oenetcls.ko and move it to the /root directory.
1 2
unxz /usr/lib/modules/5.10.0-270.0.0.173.oe2203sp4.aarch64/kernel/net/oenetcls/oenetcls.ko.xz cp /usr/lib/modules/5.10.0-270.0.0.173.oe2203sp4.aarch64/kernel/net/oenetcls/oenetcls.ko /root/
- Configure the NIC information and enable the network multipathing feature. For details about the parameters, see Table 1.
1insmod /root/oenetcls.ko ifname="eth1#eth2" strategy=1
Table 1 Parameter description Parameter
Description
Mandatory/Optional
ifname
Specifies the interface name of the NIC where the multipathing feature takes effect. Multiple interface names can be entered, which are separated by number signs (#).
Mandatory
eth1
Specify the device names. Replace the parameters with the device names of the two NICs used in Configuring the Server. You can also use one NIC. The NIC interrupts are bound to the first 32 cores of each NUMA node.
Mandatory
eth2
strategy
Specifies the interrupt-core binding affinity policy.
- 0: default policy. The NIC queue interrupts are evenly distributed to different NUMA nodes, and different NICs use different cores.
- 1: cluster-based even distribution policy. The NIC queue interrupts are evenly distributed to different clusters.
- 2: NUMA-based even distribution policy. The NIC queue interrupts are evenly distributed to different NUMA nodes. Different from the default policy, this policy allows different NICs to use the same core.
- 3: reserved policy.
Mandatory
debug
Indicates the debugging switch. The value can be dynamically changed.
0: default value. Indicates that no debug log is generated.
1: indicates that debug logs are generated.
Optional
mode
Indicates the running mode.
0: default value. Indicates the ntuple mode.
1: indicates the flow mode.
Optional
appname
Indicates the name of the process for which the multipathing feature takes effect. The default value is redis-server.
Multiple process names can be output, which are separated by number signs (#). The value is a string of a maximum of 64 bytes.
Optional
match_ip_flag
Controls whether the NIC uses the destination IP address in addition to the port number to assign incoming data packets to specific queues. The value can be dynamically changed.
0: indicates that the destination IP address is not used.
1: default value. Indicates that the destination IP address is used.
Optional
Enabling the Domain-based Scheduling Feature
1 | echo SOFT_DOMAIN > /sys/kernel/debug/sched_features |
Enabling Both the Network Multipathing and Domain-based Scheduling Features
The steps for enabling the network multipathing and domain-based scheduling features are independent. If both the two features need to be enabled, you can enable them as instructed in Enabling the Network Multipathing Feature and Enabling the Domain-based Scheduling Feature. The sequence of enabling the two features does not affect their usage.