linux – 提高OpenVPN性能
我一直在努力提高我的OpenVPN性能,这是我目前的设置:
cat /etc/openvpn/server.conf port 443 #- port proto tcp #- protocol dev tun #tun-mtu 1500 tun-mtu-extra 32 #mssfix 1450 tun-mtu 64800 mssfix 1440 reneg-sec 0 ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt cert /etc/openvpn/easy-rsa/2.0/keys/server.crt key /etc/openvpn/easy-rsa/2.0/keys/server.key dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem plugin /etc/openvpn/openvpn-auth-pam.so /etc/pam.d/login #plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login #- Comment this line if you are using FreeRADIUS #plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf #- Uncomment this line if you are using FreeRADIUS client-to-client client-cert-not-required username-as-common-name server 10.8.0.0 255.255.255.0 push "redirect-gateway def1" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" keepalive 5 30 comp-lzo persist-key persist-tun status 1194.log verb 3 客户: client dev tun proto tcp remote 18.4.26.8 443 resolv-retry infinite nobind tun-mtu 64800 tun-mtu-extra 32 mssfix 1440 persist-key persist-tun auth-user-pass comp-lzo verb 3 我从网上找到的MTU和MSSF??IX做了一些更改. 我可以做任何内核更改吗?这是一个CentOS 6.x盒子.我找到了一些基于BSD的东西,但没有任何适用于Linux的东西. 我知道TCP比UDP慢,但我需要看起来像SSL流量才能通过网络上的防火墙. 其他想法? PING到我RDP进入的网络上的另一个客户端. Pinging 10.8.0.6 with 32 bytes of data: Reply from 10.8.0.6: bytes=32 time=152ms TTL=128 Reply from 10.8.0.6: bytes=32 time=565ms TTL=128 Reply from 10.8.0.6: bytes=32 time=152ms TTL=128 Reply from 10.8.0.6: bytes=32 time=782ms TTL=128 Ping statistics for 10.8.0.6: Packets: Sent = 4,Received = 4,Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 152ms,Maximum = 782ms,Average = 412ms 有没有办法提高性能或降低ping一些? 编辑: 解决方法
简短回答:禁用comp-lzo.
我意识到这是一个老帖子,但我也遭受了糟糕的OpenVPN性能.我已经尝试了一切,调整MTU,改变snd和rcv缓冲区,mss钳位,你说出来. CPU负载可以忽略不计. 一时兴起,我禁用了压缩(从客户端和服务器中删除了comp-lzo),性能提高了2-4倍. 因此,在启用comp-lzo的情况下,我的最大性能大约为25-30 Mbit / s,没有它我达到120 Mbit / s(我的互联网连接速度). 服务器是Xeon E5-2650,客户端是Core i5-3320M.两者都运行OpenVPN 2.3.10,AES-256-CBC,SHA512.我的英特尔Chromebook也最大化了我的网速.我的Android客户端的性能提高了一倍(14 Mbit / s – > 30 Mbit / s),与IKEv2隧道速度相匹配. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |