What are the recommendations for 10 Gigabit network adapter tuning parameters?

本文提供10Gbps网络适配器的推荐调优参数,包括中断平衡、环形缓冲区、套接字缓冲区及网络预算调整等,以实现更快的数据传输速度。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://access.redhat.com/solutions/127143

What are the recommendations for 10 Gigabit network adapter tuning parameters?

 SOLUTION 已验证 - 已更新 2017年三月20日01:07 - 

English 

环境

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • 10 Gigabit Ethernet network interface adapters (10GbE)

问题

  • What are the recommendations for 10 Gigabit network adapter tuning parameters?
  • 10Gbit NIC with MTU of 9000. Testing using iperf between two systems only results in 6-7 gigabits/s transfer speed.
  • What are the expected and recommended tuning parameters to configure to achieve 10Gbps connection wirespeed for streaming bulk transfers?

决议

The following parameters are very general recommendations to achieve faster streaming transfers over 10 Gigabit Ethernet.

Depending on the actual production use of the network, these settings may not be optimal for your usage, however they will certainly make artificial benchmarks like iperf run faster.

Interrupt Balancing

Ensure the irqbalance service is installed and running.

Ring Buffer

It is recommended to make the NIC receive and transmit ring buffers as large as possible to prevent packet drops.

The procedure to increase the buffer size is described at:

The change can be persisted across reboots by following:

Socket Buffers

Increasing the maximum socket buffer size to 16MiB allows buffers to grow larger if required.

The following changes can be applied in /etc/sysctl.conf and applied immediately with sysctl -p:

Raw

# set min/default/max TCP read buffer
net.ipv4.tcp_rmem = 4096 87380 16777216
# set min/default/max TCP write buffer
net.ipv4.tcp_wmem = 4096 16384 16777216

# set maximum non-TCP receive socket buffer size
net.core.rmem_max = 16777216
# set maximum non-TCP write socket buffer size
net.core.wmem_max = 16777216

Increasing the default socket buffer sizes is not required as this basic level of tuning as it may harm efficiency of non-streaming transfers.

Network Budget

If the third column of /proc/net/softnet_stat is increasing, eg:

Raw

# cat /proc/net/softnet_stat
0073d76b 00000000 000049ae 00000000 00000000 00000000 00000000 00000000 00000000 00000000 

Then there could be benefit to allowing the kernel packet receive handler to run for a slightly longer time.

The default value is 300 meaning 300 packets are received before the handler ends. This can be increased, though there is unlikely to be much improvement increasing this past several thousand.

The following change can be applied in /etc/sysctl.conf and applied immediately with sysctl -p:

Raw

# set number of packets softirq receives off NIC before exiting
net.core.netdev_budget = 1000

Further Reading

The following documents can assist in more precise tuning:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值