Skip to content

Instantly share code, notes, and snippets.

@seanjensengrey
Last active May 8, 2021 00:43
Show Gist options
  • Save seanjensengrey/48e196fe9d4466984727e6ececf2ae53 to your computer and use it in GitHub Desktop.
Save seanjensengrey/48e196fe9d4466984727e6ececf2ae53 to your computer and use it in GitHub Desktop.

Revisions

  1. seanjensengrey revised this gist May 7, 2021. 1 changed file with 48 additions and 1 deletion.
    49 changes: 48 additions & 1 deletion iperf3.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    # Test localhost bandwidth with iperf3, https://github.com/esnet/iperf
    # Test localhost bandwidth with iperf3

    https://github.com/esnet/iperf

    ## launch a server process

    @@ -30,4 +32,49 @@ Connecting to host localhost, port 5201
    iperf Done.
    ```

    # IPv4 vs IPv6

    ```
    ➜ 05-2021-07 ~/bin/iperf3/bin/iperf3 -c localhost -f M -4
    Connecting to host localhost, port 5201
    [ 5] local 127.0.0.1 port 43630 connected to 127.0.0.1 port 5201
    [ ID] Interval Transfer Bitrate Retr Cwnd
    [ 5] 0.00-1.00 sec 6.68 GBytes 6844 MBytes/sec 0 1.31 MBytes
    [ 5] 1.00-2.00 sec 6.79 GBytes 6950 MBytes/sec 0 1.50 MBytes
    [ 5] 2.00-3.00 sec 6.80 GBytes 6963 MBytes/sec 0 1.62 MBytes
    [ 5] 3.00-4.00 sec 6.85 GBytes 7019 MBytes/sec 0 1.62 MBytes
    [ 5] 4.00-5.00 sec 6.76 GBytes 6918 MBytes/sec 0 2.06 MBytes
    [ 5] 5.00-6.00 sec 6.64 GBytes 6801 MBytes/sec 0 2.06 MBytes
    [ 5] 6.00-7.00 sec 6.75 GBytes 6910 MBytes/sec 0 3.12 MBytes
    [ 5] 7.00-8.00 sec 6.73 GBytes 6896 MBytes/sec 0 3.12 MBytes
    [ 5] 8.00-9.00 sec 6.71 GBytes 6872 MBytes/sec 0 3.12 MBytes
    [ 5] 9.00-10.00 sec 6.79 GBytes 6955 MBytes/sec 0 3.12 MBytes
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval Transfer Bitrate Retr
    [ 5] 0.00-10.00 sec 67.5 GBytes 6913 MBytes/sec 0 sender
    [ 5] 0.00-10.00 sec 67.5 GBytes 6913 MBytes/sec receiver
    iperf Done.
    ➜ 05-2021-07 ~/bin/iperf3/bin/iperf3 -c localhost -f M -6
    Connecting to host localhost, port 5201
    [ 5] local ::1 port 36244 connected to ::1 port 5201
    [ ID] Interval Transfer Bitrate Retr Cwnd
    [ 5] 0.00-1.00 sec 7.28 GBytes 7457 MBytes/sec 0 1.44 MBytes
    [ 5] 1.00-2.00 sec 7.36 GBytes 7532 MBytes/sec 0 1.44 MBytes
    [ 5] 2.00-3.00 sec 7.34 GBytes 7518 MBytes/sec 0 1.44 MBytes
    [ 5] 3.00-4.00 sec 7.47 GBytes 7649 MBytes/sec 0 1.44 MBytes
    [ 5] 4.00-5.00 sec 7.38 GBytes 7559 MBytes/sec 0 2.56 MBytes
    [ 5] 5.00-6.00 sec 7.64 GBytes 7821 MBytes/sec 0 2.93 MBytes
    [ 5] 6.00-7.00 sec 7.10 GBytes 7270 MBytes/sec 0 2.93 MBytes
    [ 5] 7.00-8.00 sec 5.34 GBytes 5467 MBytes/sec 0 2.93 MBytes
    [ 5] 8.00-9.00 sec 5.35 GBytes 5475 MBytes/sec 0 2.93 MBytes
    [ 5] 9.00-10.00 sec 5.25 GBytes 5373 MBytes/sec 0 4.43 MBytes
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval Transfer Bitrate Retr
    [ 5] 0.00-10.00 sec 67.5 GBytes 6912 MBytes/sec 0 sender
    [ 5] 0.00-10.00 sec 67.5 GBytes 6912 MBytes/sec receiver
    iperf Done.
    ```
  2. seanjensengrey revised this gist May 7, 2021. 1 changed file with 33 additions and 0 deletions.
    33 changes: 33 additions & 0 deletions iperf3.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    # Test localhost bandwidth with iperf3, https://github.com/esnet/iperf

    ## launch a server process

    ```
    iperf3 -s
    ```

    ## run client against server

    ```
    ➜ 05-2021-07 ~/bin/iperf3/bin/iperf3 -c localhost -f M
    Connecting to host localhost, port 5201
    [ 5] local 127.0.0.1 port 43600 connected to 127.0.0.1 port 5201
    [ ID] Interval Transfer Bitrate Retr Cwnd
    [ 5] 0.00-1.00 sec 6.70 GBytes 6862 MBytes/sec 0 1.69 MBytes
    [ 5] 1.00-2.00 sec 6.82 GBytes 6982 MBytes/sec 0 1.75 MBytes
    [ 5] 2.00-3.00 sec 6.90 GBytes 7069 MBytes/sec 0 1.87 MBytes
    [ 5] 3.00-4.00 sec 6.59 GBytes 6748 MBytes/sec 0 2.06 MBytes
    [ 5] 4.00-5.00 sec 6.60 GBytes 6756 MBytes/sec 0 2.06 MBytes
    [ 5] 5.00-6.00 sec 6.88 GBytes 7040 MBytes/sec 0 3.12 MBytes
    [ 5] 6.00-7.00 sec 6.95 GBytes 7116 MBytes/sec 0 3.12 MBytes
    [ 5] 7.00-8.00 sec 6.76 GBytes 6918 MBytes/sec 0 3.12 MBytes
    [ 5] 8.00-9.00 sec 6.86 GBytes 7026 MBytes/sec 0 3.12 MBytes
    [ 5] 9.00-10.00 sec 6.81 GBytes 6975 MBytes/sec 0 3.12 MBytes
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval Transfer Bitrate Retr
    [ 5] 0.00-10.00 sec 67.9 GBytes 6949 MBytes/sec 0 sender
    [ 5] 0.00-10.00 sec 67.9 GBytes 6949 MBytes/sec receiver
    iperf Done.
    ```
  3. seanjensengrey created this gist May 7, 2021.
    64 changes: 64 additions & 0 deletions ipc_test.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,64 @@
    from https://github.com/detailyang/ipc_benchmark

    ```
    make all
    python2 run_test.py
    ```

    Note that this compiles with `-g` but now opt level.

    ```
    TPS
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | test/size | 128 x 100000 | 256 x 100000 | 512 x 100000 | 1024 x 100000 | 2048 x 100000 | 4096 x 100000 |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | pipe | 264MB/s | 523MB/s | 925MB/s | 1967MB/s | 3594MB/s | 5179MB/s |
    | fifo | 240MB/s | 458MB/s | 1014MB/s | 1934MB/s | 3635MB/s | 5010MB/s |
    | socketpair | 195MB/s | 363MB/s | 727MB/s | 1337MB/s | 2401MB/s | 3826MB/s |
    | uds | 124MB/s | 317MB/s | 436MB/s | 879MB/s | 1728MB/s | 2850MB/s |
    | tcp | 149MB/s | 367MB/s | 563MB/s | 948MB/s | 1896MB/s | 3083MB/s |
    | shm | 33MB/s | 65MB/s | 120MB/s | 276MB/s | 498MB/s | 926MB/s |
    | posixq | 240MB/s | 473MB/s | 871MB/s | 1438MB/s | 3017MB/s | 4871MB/s |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    QPS
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | test/size | 128 x 100000 | 256 x 100000 | 512 x 100000 | 1024 x 100000 | 2048 x 100000 | 4096 x 100000 |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | pipe | 2161689msg/s | 2141142msg/s | 1894660msg/s | 2014546msg/s | 1839962msg/s | 1325767msg/s |
    | fifo | 1962165msg/s | 1874658msg/s | 2076111msg/s | 1980042msg/s | 1860918msg/s | 1282462msg/s |
    | socketpair | 1599640msg/s | 1486103msg/s | 1488186msg/s | 1368925msg/s | 1229331msg/s | 979470msg/s |
    | uds | 1016665msg/s | 1298904msg/s | 892570msg/s | 899710msg/s | 884908msg/s | 729501msg/s |
    | tcp | 1222063msg/s | 1502635msg/s | 1153108msg/s | 970326msg/s | 970883msg/s | 789130msg/s |
    | shm | 268015msg/s | 265244msg/s | 246591msg/s | 282334msg/s | 254783msg/s | 236936msg/s |
    | posixq | 1966221msg/s | 1938774msg/s | 1784248msg/s | 1472797msg/s | 1544477msg/s | 1246913msg/s |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    ```

    # Compiled with `-O3`

    ```
    TPS
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | test/size | 128 x 100000 | 256 x 100000 | 512 x 100000 | 1024 x 100000 | 2048 x 100000 | 4096 x 100000 |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | pipe | 256MB/s | 506MB/s | 928MB/s | 1893MB/s | 3282MB/s | 5251MB/s |
    | fifo | 264MB/s | 493MB/s | 882MB/s | 1868MB/s | 3291MB/s | 5104MB/s |
    | socketpair | 181MB/s | 356MB/s | 670MB/s | 1300MB/s | 2327MB/s | 3636MB/s |
    | uds | 124MB/s | 187MB/s | 520MB/s | 931MB/s | 1748MB/s | 2863MB/s |
    | tcp | 155MB/s | 302MB/s | 556MB/s | 1099MB/s | 2112MB/s | 3140MB/s |
    | shm | 32MB/s | 68MB/s | 128MB/s | 249MB/s | 464MB/s | 952MB/s |
    | posixq | 240MB/s | 478MB/s | 823MB/s | 1673MB/s | 2866MB/s | 4679MB/s |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    QPS
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | test/size | 128 x 100000 | 256 x 100000 | 512 x 100000 | 1024 x 100000 | 2048 x 100000 | 4096 x 100000 |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    | pipe | 2094764msg/s | 2073401msg/s | 1899663msg/s | 1938854msg/s | 1680424msg/s | 1344285msg/s |
    | fifo | 2164735msg/s | 2020241msg/s | 1806947msg/s | 1912552msg/s | 1684953msg/s | 1306543msg/s |
    | socketpair | 1478768msg/s | 1456153msg/s | 1371858msg/s | 1330744msg/s | 1191398msg/s | 930907msg/s |
    | uds | 1019099msg/s | 767312msg/s | 1064758msg/s | 952980msg/s | 894855msg/s | 732820msg/s |
    | tcp | 1272590msg/s | 1236660msg/s | 1138111msg/s | 1125317msg/s | 1081561msg/s | 803717msg/s |
    | shm | 263219msg/s | 276964msg/s | 262654msg/s | 255271msg/s | 237340msg/s | 243679msg/s |
    | posixq | 1964361msg/s | 1955915msg/s | 1685150msg/s | 1713122msg/s | 1467438msg/s | 1197750msg/s |
    +------------+--------------+--------------+--------------+---------------+---------------+---------------+
    ```