模版——网卡问题处理及优化模版

 

场景:Gbase数据库存放AI训练模型数据,通过sftp拉取单个包39MB数据实时流量39MB/s;

问题:单次sftp拉取数据量500M~2G左右,10个包左右出现0~10Mbps的情况;

初步排查:

1、(咨询服务器厂商)bond1子网卡ens4f1存在丢包rx_missed_errors,子网卡eno1存在port.rx_dropped;

2、(咨询服务器厂商)bond1子网卡eno1(driver:i40e version:2.3.2-k)和ens4f1(driver:ixgbe version:5.1.0-k)网卡不同,可能存在兼容问题;

3、(业务评估)尝试关闭网卡eno1中断配置;
# 查看中断是否开启
ethtool -c eno1

# 关闭eno1中断配置
ethtool -C eno1 adaptive-rx off
ethtool -C eno1 adaptive-tx off

4、(业务评估)系统保留内存不足,建议保留3%-10%;
优化建议:
# 系统保留内存:保留总内存的3%~10%
# 固化配置/etc/sysctl.conf
vim /etc/sysctl.conf
vm.min_free_kbytes = 总内存*10%

# 异步回收(内存中脏数据百分比)
vm.dirty_background_ratio = 5
# 同步回收
vm.dirty_ratio = 10
# 固化配置/etc/sysctl.conf
vim /etc/sysctl.conf
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10

5、(业务评估)调整网卡ringbuffer队列深度,缓解IO丢包;
# 查看网卡队列深度 
ethtool -g eno1
ethtool -g ens4f1
# 修改网卡队列深度(通讯瞬断)
ethtool -G eno1 rx 4096
ethtool -G eno1 tx 4096
ethtool -G ens4f1 rx 4096
ethtool -G ens4f1 tx 4096

6、(业务评估)清理缓存;
# 评估是否清理缓存数据drop-cache;
    sync && echo 3 > /proc/sys/vm/drop_caches        #将内存中数据刷到磁盘中
# 查看
free -h

 

posted on 2025-08-25 15:02  gkhost  阅读(11)  评论(0)    收藏  举报

导航