用 openvpn 组建复杂的网络环境有段时间了,由于总出口都是从一台VPN 发送和接收,有时候会发现不稳定的情况,查看openvpn 日志 发现有时候会发现大量的 packet dropped 日志。很多包都呗 drop 掉了,
Sun Jan 4 09:33:12 2015 us=353715 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun) Sun Jan 4 09:33:12 2015 us=353732 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun) Sun Jan 4 09:33:12 2015 us=353748 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun) Sun Jan 4 09:33:12 2015 us=353774 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun) Sun Jan 4 09:33:12 2015 us=353792 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun) Sun Jan 4 09:33:12 2015 us=353809 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun) Sun Jan 4 09:33:12 2015 us=353825 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun) Sun Jan 4 09:33:12 2015 us=353841 aikaiyuan/192.168.1.2:51433 MULTI: packet dropped due to output saturation (multi_process_incoming_tun)
由于我用的不是默认的 UDP 协议,用的是 TCP 协议。
解决办法添加参数:
cat /etc/openvpn/server.conf | grep tcp-queue tcp-queue-limit 512