木曜日, 7月 17, 2025
木曜日, 7月 17, 2025
- Advertisment -
ホームニューステックニュースLatte for Windows でコンピュート間のレイテンシ(遅延)をマイクロ秒(μs)単位で測定してみてみた #Network

Latte for Windows でコンピュート間のレイテンシ(遅延)をマイクロ秒(μs)単位で測定してみてみた #Network



Latte for Windows でコンピュート間のレイテンシ(遅延)をマイクロ秒(μs)単位で測定してみてみた #Network

latteロゴ.png
Azure VM 間のネットワーク待機時間をテストするより~
Latte は、TCP (Transmission Control Protocol) と UDP (User Datagram Protocol) トラフィック レイテンシ を マイクロ秒(μs)単位で測定できます。 ほとんどのアプリケーションではこれらのプロトコルが使用され、このトラフィックはアプリケーションのパフォーマンスに最も大きな影響を及ぼします。
Latte は、TCP または UDP ペイロードのデリバリー時間のみを測定します。 このツールでは、次の方法を使用して、2 台の物理コンピューターまたは仮想コンピューター間のネットワーク待機時間を測定します。

1) 送信側(Server)と受信側(Client)を指定して、コンピューター間に双方向の通信チャネルを作成し
2) 双方向でパケットを送受信し、ラウンドトリップ時間 (RTT)を測定できます。

ということで、Latte for Windows を使用して、Oracle Cloud Infrastructure(OCI) コンピュート VM.Standard.E5.Flex 間のネットワーク・レイテンシを測定してみてみます。

Ping などの他の一般的なネットワーク待機時間テスト ツールの多くは、TCP または UDP トラフィックを測定しません。 Ping などのツールでは、アプリケーションで使用されないインターネット制御メッセージ プロトコル (ICMP) が使用されます。 ICMP トラフィックはアプリケーション トラフィックとは異なる方法で処理され、アプリケーションのパフォーマンスに直接影響を与えるわけではありません。 ICMP テスト結果は、TCP と UDP を使用するワークロードには直接適用されません。

● latte.exe ダウンロード

https://github.com/microsoft/latte から 最新バージョンの latte.exe をダウンロード

● latte.exe 配置

C:\tools などのフォルダーに配置します。
今回は、環境変数(PATH)の設定の手間をはぶくため、、pingコマンドと同じディレクトリ C:\Windows\System32\latte.exe へ配置してみてみます。

配置家訓

PS C:\> where.exe latte
	C:\Windows\System32\latte.exe

● latte.exe 確認

・ Version 確認

PS C:\> latte.exe -ver
	Latte version 0000.8303

・ Help 確認
Latte の使い方はここから学びます。

PS C:\> latte.exe

This tool measures the average latency between T0 and T3 over a number of
iterations of the following sequence of operations:
  T0: client sends a message to server
  T1: server receives the message
  T2: server sends the message back to client
  T3: client receives the message back

Following parameters control the behavior:

-ga : get args from client (server only, must be specified first)
-sa : send args to server  (client only, must be specified first)
-so : turns server off  (client only, must be specified first)
-c : client (default: server)
-a  : communication address
-bl  : local address (client only, default: wildcard)
-tcp | -udp | -raw : socket type (default: tcp)
-s : use send-then-receive sequence on server (-tcp only)
-r : use receive-then-send sequence on client (-tcp only)
-rio : Use RIO send/receive
-riopoll  : Poll  times before waiting on RIO CQ
-proc  : processor number to affinitize to (default: no affinity)
-group : processor group to affinitize to
-mcast : use multicast (-udp and -raw only)
-snd b | nb | ove | ovc | ovp | sel : send method (default: b - blocking)
-rcv b | nb | ove | ovc | ovp | sel : receive method (default: b - blocking)
-m  (default: 4)
-i  (default: 10000)
-t  : test duration (sec) (default: iterations will be used)
                if -t and -i are both present -t overrides the -i option
-sb  (default: SO_SNDBUF not set)
-rb  (default: SO_RCVBUF not set)
-tick : Use GetTickCount() instead of performance counters
-csv : print results in CSV format on a single line without headers
-csvh : print results in CSV format on a single line with headers
-csvtag  : adds the specified tag string to the CSV output
-hist : print histogram of per-iteration latency values (client only)
-hs  : histogram 1st interval start value (default: 0 usec)
-hl  : length of histogram intervals (default: 100 usec)
-hc  : number of histogram intervals (default: 10)
-ver : print the version and exit
-it  : iteration timeout (msec) (default: no timeout)
-dump  : dump all values to 
-hrtt : calculate half round-trip latency

● Windows Defender ファイアウォール設定

受信側 Windows で、Latte トラフィックの着信を許可する Windows Defender ファイアウォール allow ルールを作成します。
特定の受信 TCP ポートを許可するよりも、名前で latte.exeプログラム を許可する方が簡単です。 コマンドで、プレースホルダーを c:\tools\ など、ダウンロードした latte.exeパスに置き換えます。

Windows コマンド プロンプト

netsh advfirewall firewall add rule program= name="Latte" protocol=any dir=in action=allow enable=yes profile=ANY

実行例

PS C:\> netsh advfirewall firewall add rule program=C:\Windows\System32\latte.exe name="Latte" protocol=any dir=in action=allow enable=yes profile=ANY
Ok.

● Server側コンピュートでの実行

Windows コマンド ラインから latte.exe を実行します。
受信側(IP: 10.10.0.11)で次のコマンドを実行します。

Windows コマンド プロンプト

latte -a : -i 

	- iterations: 代表的な結果を返すには、65000 前後のイテレーションが十分です。
	- port: 使用可能な任意のポート番号で構いません。

実行結果

PS C:\> latte.exe -a 10.10.0.11:5005 -i 65100                                                                 Protocol      TCP
	SendMethod    Blocking
	ReceiveMethod Blocking
	SO_SNDBUF     Default
	SO_RCVBUF     Default
	MsgSize(byte) 4
	Iterations    65100

● Client側コンピュートでの実行

送信側 で、Client の オプション -c を追加して受信側と同じコマンドを実行します。

Windows コマンド プロンプト

結果を待ちます。 VM 同士の距離によっては、テストの完了までに数分かかる場合があります。 長いテストを実行する前に、成功についてテストするために少数のイテレーションで開始することを検討してください。

実行結果

PS C:\> latte.exe -c -a 10.10.0.11:5005 -i 65100
Protocol      TCP
SendMethod    Blocking
ReceiveMethod Blocking
SO_SNDBUF     Default
SO_RCVBUF     Default
MsgSize(byte) 4
Iterations    65100
Latency(usec) 34.53
CPU(%)        5.9
CtxSwitch/sec 68121     (2.35/iteration)
SysCall/sec   69740     (2.41/iteration)
Interrupt/sec 91927     (3.17/iteration)

実行結果から レイテンシは マイクロ秒(μs)単位で確認できます
Latency(usec) 34.53 = 0.03453 ms

-udp オプションを追加することで UDPで測定できます。

PS C:\> latte.exe -c -a 10.10.0.11:5005 -i 65100 -udp
Protocol      UDP
SendMethod    Blocking
ReceiveMethod Blocking
SO_SNDBUF     Default
SO_RCVBUF     Default
MsgSize(byte) 4
Iterations    65100
Latency(usec) 34.95
CPU(%)        4.7
CtxSwitch/sec 58029     (2.03/iteration)
SysCall/sec   58668     (2.05/iteration)
Interrupt/sec 86328     (3.02/iteration)

実行結果から レイテンシは マイクロ秒(μs)単位で確認できます
Latency(usec) 34.95 = 0.03495 ms

Azure VM 間のネットワーク待機時間をテストする
Microsoft Latte
仮想ネットワークへの VPN スループットを検証する方法





Source link

Views: 0

RELATED ARTICLES

返事を書く

あなたのコメントを入力してください。
ここにあなたの名前を入力してください

- Advertisment -