如何优先考虑我在Azure中的networkingstream量?

我在Azure上创build了两个虚拟机,一个在澳大利亚东部,另一个在巴西南部。 这两个虚拟机是典型的模型,运行Ubuntu 16.04。 我在这些虚拟机上创build了端点,并在这些虚拟机上运行了一个服务器客户机程序(使用C ++)。 我观察到非常高的延迟。 大概转移2MB需要4秒钟。 我需要为我的应用程序非常低的延迟(传输2 MB小于0.1-0.2秒)。 我怎样才能达到(甚至接近)呢? 有没有一种方法来优先我的networkingstream量? 有没有办法在Azure上购买更多的带宽? 有没有办法在Azure上删除防火墙,这可能会减less延迟?

有没有办法在Azure上购买更多的带宽?

你的VM的大小是多less? 增加VM大小可以增加VM的带宽。 您可以使用iperf3来testing虚拟机之间的带宽。 这是我的结果。 我的VM是A0大小。

 root@shui:~# iperf3 -c 40.126.252.224 Connecting to host 40.126.252.224, port 5201 [ 4] local 10.0.0.4 port 37260 connected to 40.126.252.224 port 5201 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 360 KBytes 2.95 Mbits/sec 0 55.8 KBytes [ 4] 1.00-2.18 sec 487 KBytes 3.39 Mbits/sec 0 123 KBytes [ 4] 2.18-3.00 sec 1.41 MBytes 14.3 Mbits/sec 0 266 KBytes [ 4] 3.00-4.00 sec 1.17 MBytes 9.83 Mbits/sec 1 282 KBytes [ 4] 4.00-5.00 sec 600 KBytes 4.91 Mbits/sec 0 283 KBytes [ 4] 5.00-6.00 sec 1.17 MBytes 9.83 Mbits/sec 0 291 KBytes [ 4] 6.00-7.18 sec 660 KBytes 4.57 Mbits/sec 0 300 KBytes [ 4] 7.18-8.00 sec 1.35 MBytes 13.8 Mbits/sec 0 336 KBytes [ 4] 8.00-9.00 sec 720 KBytes 5.89 Mbits/sec 0 379 KBytes [ 4] 9.00-10.00 sec 1.70 MBytes 14.2 Mbits/sec 0 442 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 9.55 MBytes 8.01 Mbits/sec 1 sender [ 4] 0.00-10.00 sec 7.96 MBytes 6.67 Mbits/sec receiver 

我在我的实验室testing, iperf3已经安装在Azure Ubuntu 16.04上。 testing方法。

在一台虚拟机上以服务器模式运行iperf,您应该在端点上打开端口5201。

 $ iperf3 -s 

在另一个虚拟机上运行单线程testing:

 $ iperf3 -c ip-of-server 

对于multithreadingtesting:

 $ iperf3 -c ip-of-server -P n 

其中n = VM中的核心数量

更多的testing结果你可以参考这个博客 。

有没有一种方法来优先我的networkingstream量?

据我所知,你可以从以下三个方面优先考虑你的networking。

1.select合适的VM大小

您可以在实验室testing虚拟机带宽,并select合适的虚拟机大小。 您可以参考以下链接: 高性能计算Linux VM大小 。

2.优化你的代码和algorithm。

3.如果你有很高的networking延迟要求,我build议你可以selectAzure BGP 。 你也可以参考这个链接 。