03) Optimize parameter Settings in Linux to improve network performance

 

Network port optimization in Linux system can be used for troubleshooting when the transmission rate is low and the transmission error is reported for unknown reasons.
1, optimize the CPU, give play to the best performance of the CPU;
View the current CPU frequency.
#cat /proc/cpuinfo |grep MHz

03) Optimize parameter Settings in Linux to improve network performance插图

Set the maximum operating frequency;

        #cpupower frequency-set -g performance

03) Optimize parameter Settings in Linux to improve network performance插图1

2. Optimize the network port queue;
Check the current default number of queues. General network cards support multiple queues.
#ethtool -l ethX  (ethX: corresponding port number, use #ip a or #ifcofnig -a to view)

03) Optimize parameter Settings in Linux to improve network performance插图2

#ethtool -L ethX combined 128 (63: maximum supported value from the above command)
If you encounter a setting failure, you can update the driver to try, the older driver will be a reason for the failure of the setting;
3, optimize the buffer size of network ports;
View the default sending and receiving buffer size.
#ethtool -g ethX  (ethX: port number to view, see using #ip a or #ifcofnig -a)

03) Optimize parameter Settings in Linux to improve network performance插图3

Set the sending and receiving buffer size;
#ethtool -G ethX rx 4096 tx 4096 (4096: the maximum value that can be supported from the above command)

03) Optimize parameter Settings in Linux to improve network performance插图4

4. Optimize the MTU value of the network port, which is generally 1500 by default;
View the default MTU size.
It can be seen using #ip a or #ifcofnig -a;
View the corresponding network port number.

03) Optimize parameter Settings in Linux to improve network performance插图5

#ifconfig ethX mtu 9000 (9000: indicates the preset size. Generally, 9000 is the maximum value.)

03) Optimize parameter Settings in Linux to improve network performance插图6

After the optimal Settings of the network ports are made by C-S, better results will be obtained during the rate benchmark test.