Windows

ctsTraffic でパフォーマンス測定

ctsTraffic はマイクロソフトのドキュメントで登場するネットワーク ツールです。

ctsTraffic は、詳細なパフォーマンスと信頼性の分析を提供する、高度にスケーラブルなクライアント/サーバー ネットワーキング ツールです。

Linuxではiperfなどがあります。

これはWindows 用のツールです。

GitHub - microsoft/ctsTraffic: ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics
GitHub - microsoft/ctsTraffic: ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics

ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliab ...

github.com

 

バージョン2.0.3.0を利用します。arm64、X64、X86が用意されています。

自分の環境に合わせてダウンロードします。

必用なのctsTraffic.exe のみです。クライアント側とサーバー側にダウンロードしておきます。

それぞれコマンドを打つ準備をします。サーバー側はクライアントを待って開始してくれるツールではありません。

サーバー

ctsTraffic.exe -listen:* -consoleverbosity:1

クライアント

ctsTraffic.exe -target:{サーバーIP} -consoleverbosity:1

これは一番単純な利用方法です。

PS C:\Users\azureuser> C:\Users\azureuser\Desktop\ctsTraffic.exe -listen:* -consoleverbosity:1
  Configured Settings
-----------------------
        Protocol: TCP
        Options: KeepAlive InlineIOCP MsgWaitAll
        IO function: Iocp (WSASend/WSARecv using IOCP)
        IoPattern: Push 
        PrePostRecvs: 1
        PrePostSends: 1
        Level of verification: Connections & Data
        Port: 4444
        Buffer used for each IO request: 65536 [0x10000] bytes
        Total transfer per connection: 1073741824 bytes
        Accepting connections on addresses:
                0.0.0.0:4444
                [::]:4444
        Server-accepted connections before exit : 0xffffffffffffffff

Legend:
* TimeSlice - (seconds) cumulative runtime
* Send & Recv Rates - bytes/sec that were transferred within the TimeSlice period
* In-Flight - count of established connections transmitting IO pattern data
* Completed - cumulative count of successfully completed IO patterns
* Network Errors - cumulative count of failed IO patterns due to Winsock errors
* Data Errors - cumulative count of failed IO patterns due to data errors


 TimeSlice      SendBps      RecvBps  In-Flight  Completed  NetError  DataError

     0.002            0            0          0          0         0          0
     5.003           59      2883007          8          0         0          0
    10.003            0     18101043          8          0         0          0
    15.014            0     18218249          8          0         0          0
    20.014            0     18205900          8          0         0          0
    25.010            0     18141771          8          0         0          0
    30.015            0     18187713          8          0         0          0
    35.011            0     18181124          8          0         0          0
    40.004            0     18192048          8          0         0          0
    45.014            0     18234966          8          0         0          0
    55.011            0     18198253          8          0         0          0
    60.011            0     13160854          0          0         8          0


  Historic Connection Statistics (all connections over the complete lifetime)
-------------------------------------------------------------------------------
  SuccessfulConnections [0]   NetworkErrors [8]   ProtocolErrors [0]

  Total Bytes Recv : 989665266
  Total Bytes Sent : 296
  Total Time : 64437 ms.
PS C:\Users\kudo> C:\Users\kudo\Downloads\ctsTraffic.exe -target:4.227.151.64 -consoleverbosity:1
  Configured Settings
-----------------------
        Protocol: TCP
        Options: InlineIOCP MsgWaitAll
        IO function: Iocp (WSASend/WSARecv using IOCP)
        IoPattern: Push 
        PrePostRecvs: 1
        PrePostSends: 1
        Level of verification: Connections & Data
        Port: 4444
        Buffer used for each IO request: 65536 [0x10000] bytes
        Total transfer per connection: 1073741824 bytes
        Connecting out to addresses:
                4.227.151.64:4444
        Binding to local addresses for outgoing connections:
                0.0.0.0
        Connection limit (maximum established connections): 8 [0x8]
        Connection throttling rate (maximum pended connection attempts): 1000 [0x3e8]
        Total outgoing connections before exit (iterations * concurrent connections) : 0xffffffffffffffff

Legend:
* TimeSlice - (seconds) cumulative runtime
* Send & Recv Rates - bytes/sec that were transferred within the TimeSlice period
* In-Flight - count of established connections transmitting IO pattern data
* Completed - cumulative count of successfully completed IO patterns
* Network Errors - cumulative count of failed IO patterns due to Winsock errors
* Data Errors - cumulative count of failed IO patterns due to data errors


 TimeSlice      SendBps      RecvBps  In-Flight  Completed  NetError  DataError

     5.000         1192            0          8          0         0          0
    10.000     18271436            0          8          0         0          0
    15.001     18529874            0          8          0         0          0
    20.001     18219008            0          8          0         0          0
    25.001     18336972            0          8          0         0          0
    30.001     18192793            0          8          0         0          0
    35.000     18183323            0          8          0         0          0
    40.001     18202260            0          8          0         0          0
    45.001     18219008            0          8          0         0          0
    50.001     18284544            0          8          0         0          0
    55.001     18205900            0          8          0         0          0


  Historic Connection Statistics (all connections over the complete lifetime)
-------------------------------------------------------------------------------
  SuccessfulConnections [0]   NetworkErrors [0]   ProtocolErrors [0]

  Total Bytes Recv : 296
  Total Bytes Sent : 999555072
  Total Time : 55513 ms.

ここからスループットを計算します。

  Total Bytes Recv : 989665266
  Total Bytes Sent : 296
  Total Time : 64437 ms.

( 989665266 / 64437 ) * 8 = 約122Mbps

家の回線が最大で350Mbpsなのでそのぐらいでしょう。

あと注意事項としてクラウド側からどこかに計測するとトラフィックの料金がかかるので気を付けてください。

-Windows
-,