{"id":1378,"date":"2021-03-14T16:45:41","date_gmt":"2021-03-14T16:45:41","guid":{"rendered":"https:\/\/dft.wiki\/?p=1378"},"modified":"2021-03-14T18:29:55","modified_gmt":"2021-03-14T18:29:55","slug":"performance-comparison-openvpn-vs-wireguard","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=1378","title":{"rendered":"Performance Comparison: OpenVPN vs WireGuard"},"content":{"rendered":"<p><strong>Preparation and Resources<\/strong><\/p>\n<ul>\n<li>2 virtual machines located on the same data center (Linode) and location (Toronto);<\/li>\n<li><strong>1<\/strong> vCPU and <strong>1<\/strong> GB of RAM each;<\/li>\n<li>Fresh installation of Ubuntu 20.04 LTS on both;<\/li>\n<li>Connected over the <strong>Local Network<\/strong>.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1410\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2021-03-14-13-37-42.png\" alt=\"\" width=\"597\" height=\"174\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2021-03-14-13-37-42.png 597w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2021-03-14-13-37-42-300x87.png 300w\" sizes=\"auto, (max-width: 597px) 100vw, 597px\" \/><\/p>\n<p>Command used to simulate the file transfer with no interference of the usage and speed of the storage:<\/p>\n<pre>dd if=\/dev\/zero bs=4096 count=244141 | ssh root@ip 'cat &gt; \/dev\/null'<\/pre>\n<p>Speed test over <strong>LAN<\/strong><\/p>\n<p>1000001536 bytes (1.0 GB, 954 MiB) copied, 8.91455 s, <strong>112 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 8.79031 s, <strong>114 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 8.38244 s, <strong>119 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 9.31981 s, <strong>107 MB\/s<br \/>\n<\/strong>Average: <strong>113 MB\/s or 904 Mbps<\/strong><\/p>\n<p>Speed test over <strong>WireGuard<\/strong><\/p>\n<p>1000001536 bytes (1.0 GB, 954 MiB) copied, 18.8587 s, <strong>53.0 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 17.3815 s, <strong>57.5 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 16.9099 s, <strong>59.1 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 16.9099 s, <strong>59.0 MB\/s<br \/>\n<\/strong>Average:<strong> 57.15 MB\/s or 457.2 Mbps<br \/>\n<\/strong><\/p>\n<p>Speed test over <strong>OpenVPN<\/strong><\/p>\n<p>1000001536 bytes (1.0 GB, 954 MiB) copied, 82.3243 s, <strong>12.1 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 82.1518 s, <strong>12.2 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 81.9139 s, <strong>12.2 MB\/s<\/strong><br \/>\n1000001536 bytes (1.0 GB, 954 MiB) copied, 82.3855 s, <strong>12.1 MB\/s<\/strong><br \/>\nAverage:<strong> 12.15 MB\/s or 97.2 Mbps<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1406\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2021-03-14-13-16-08.png\" alt=\"\" width=\"511\" height=\"332\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2021-03-14-13-16-08.png 511w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2021\/03\/Screenshot-from-2021-03-14-13-16-08-300x195.png 300w\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" \/><\/p>\n<p><strong>Conclusions<\/strong><\/p>\n<ul>\n<li>SSH is already encrypted and each VPN required another layer of encryption and only 1 vCPU and 1 GB of RAM made a bigger impact on OpenVPN comparing to WireGuard;<\/li>\n<li>WireGuard is the perfect solution for site-to-site VPN, integrating two different networks and getting the best performance possible but it has no client authentication and does not replace OpenVPN functionalities.<\/li>\n<\/ul>\n<p><strong>Read Also<\/strong><\/p>\n<p>Setting Up WireGuard VPN [<a href=\"https:\/\/dft.wiki\/?p=1380\">Link<\/a>]<\/p>\n<p>OpenVPN Server + Monitoring [<a href=\"https:\/\/dft.wiki\/?p=348\">Link<\/a>]<\/p>\n<p>pfSense with OpenVPN Client [<a href=\"https:\/\/dft.wiki\/?p=1135\">Link<\/a>]<\/p>\n<p>GRE VPN Tunnel on Cisco [<a href=\"https:\/\/dft.wiki\/?p=593\">Link<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Preparation and Resources 2 virtual machines located on the same data center (Linode) and location [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1378","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1378"}],"version-history":[{"count":14,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1378\/revisions"}],"predecessor-version":[{"id":1415,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/1378\/revisions\/1415"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}