Adjusting the Size of Receive Buffer
Purpose
The rx_buff parameter controls the receive buffer size with four configurable options: 2 KB, 4 KB, 8 KB, or 16 KB. The value must be a power of 2 to ensure contiguous memory allocation.
The Hi1822 NIC defaults to a 2 KB rx_buff setting. When processing 64 KB aggregated packets, this buffer size triggers memory fragmentation due to the need for non-contiguous memory blocks. Increasing rx_buff to 8 KB minimizes the allocation requirements, thereby optimizing memory efficiency and boosting data transfer throughput.
Procedure
- Check the value of rx_buff. The default value is 2.
1cat /sys/bus/pci/drivers/hinic/module/parameters/rx_buff - Add the hinic.conf file to the /etc/modprobe.d/ directory and change the rx_buff value to 8.
1options hinic rx_buff=8
- Remount the hinic driver for the configuration to take effect.
1 2
rmmod hinic modprobe hinic
- Check whether the configuration is successful.
1cat /sys/bus/pci/drivers/hinic/module/parameters/rx_buffIf the parameter value is updated to 8, the configuration is successful.
Parent topic: Hardware Tuning